Macro To Insert Date In Cell When Text Is Inserted In Another Cell
Feb 20, 2008
I'm trying to write a macro similar to the one found here: here:http://www.techonthenet.com/excel/macros/checkbox.php.
Rather then use a textbox, I would like the cell to display the date when text is inserted in the cell to the left.
ie. I insert text (the letter 'a') in cell E11, and the date appears in cell F11.
I would also like the macro to do this for a range of cells ie. for E11 to F21, then from G11 to H21, then from I11 to J21, all the way to column IV.
View 9 Replies
ADVERTISEMENT
Aug 18, 2008
I have a program that automatically exports info into excel as that info becomes available. What I need is to be able to insert into a cell the exact time that the information was inserted into excel. For example, cell A1 gets info inserted into it, I need cell B1 to automatically insert the time that the info was inserted into A1. Any time there is new info inserted into A1, B1 needs to update that corresponding time.
View 2 Replies
View Related
Jul 1, 2014
[URL]
I got the code in the above link working for me, but how would I restrict it to a certain subset of Rows? It's overwriting headers and totals and other things I don't want to change in the worksheet.
View 14 Replies
View Related
Jun 23, 2014
I'm trying to create a dynamic chart title by inserting a text box in the chart title that displays the value of the last populated cell in column A. The number of rows increases over time, so I'm trying to come up with a dynamic cell reference. When I hover over the text box a tool tip appears with this text "TextBox 2" so I assume that is the name of the text box. I'm definitely open to other methods that do not use vba. It seems that none of this code can activate the text box:
Code:
Sub textbox()
Worksheets("Figure3-5").TextBoxes("TextBox 2").Range("A" & Rows.Count).End(xlUp).Value
End Sub
[Code]....
View 1 Replies
View Related
Dec 17, 2009
I am creating a time sheet for a supplier & when the supplier enters a date into column A I would like a new line to be inserted below & include the formatting, formulas & data validation from the row above.
View 7 Replies
View Related
Dec 14, 2006
I have a workbook with single sheet called Fronpage. I want to insert a new sheet and rename the sheet based on the character value user specified in R1C1 in the Frontpage, and also would like the new sheet to be the last sheet in the workbook. I have tried to use DDE, and also Macro recording to do it. It didnt work out. Can anyone have any code to do it ?
View 2 Replies
View Related
Nov 30, 2011
I am trying to write a Macro that will insert a Text Box that auto-fits the shape of a cell to hide its content. Once finished, the Macro will need to lock the cell and the text box so the contents of the cell are hidden. The idea is that I want to share a spreadsheet with someone but want to hide individual cells for various reason.
Sheet1A1SAMPLE DATA2sample3sample4HIDDEN5sampleExcel 2007
I tried to record a macro as a starting point but it recorded nothing. I searched around and it seems to be an issue without a solution.
I could obviously change the formatting and the contents of the cell but the idea is to preserve the contents if possible.
View 4 Replies
View Related
May 6, 2013
I would like to add a date to one cell (say A6) and have this do two things:
#1) this would add "Closed" to a given cell such a A5.
#2) and this would add a color to a group of cells like A1 through A8.
View 4 Replies
View Related
Nov 12, 2013
I would like to know how to use a VBA code to insert today's date into a specific cell (B9) when any cell in column B (B2:B8) has changed.
View 3 Replies
View Related
May 26, 2014
I have the macro to insert rows every nth row, but need to be able to insert text into that nth row.
I have a list of addresses and every 10 addresses i need to insert a 'seed' which will be have the same details everytime. This is what i have so far...
Sub InsertRowsMod10()
Dim r As Long
r = 10
Do Until Len(Cells(r, 1)) = 0
Rows(r).Insert Shift:=xlDown
r = r + 10
Loop
End Sub
View 2 Replies
View Related
Dec 6, 2013
I am looking to insert a date in a Cell when another Cell's number has been changed.
I was using If statement as: If(isnumber(f4),TODAY())
but I don't think it is working properly
the cells columns would be, e.g. "Consumables stock" and "date updated".
So if someone changes a number is the "consumables stock" column, date updated column auto-updates with current date. How would I go by in doing this?
View 5 Replies
View Related
May 9, 2012
I have the following columns that return cover period dates.
Start of Cover PeriodEnd of Cover Period01-Nov-0631-Jan-0701-Jul-0831-May-0901-Dec-0930-Jun-1001-Jan-1131-Dec-10
I however need a macro that will delete the cell contents if the "Start of Cover Period" (column AK) date is > than the "End of cover period" (column AL) date.
Thus it must compare ak2 with al2 and if ak2>al2 then clear both cells. if AK2
View 2 Replies
View Related
Aug 30, 2012
I am trying to make a macro that will query a column J4 for a date, if the date is found say "Wednesday, July 4, 2012" (J8) get the text from Column K8 "Independence Day" and insert the text in Cell (H1).
The Macro Prints sign in sheets with the date in H2, it only prints Monday through friday. Then skips the weekend and the next date will start the following Monday.
The Federal Holiday schedule is in column range J (Date) and K (Holiday)
This is where I am stuck ....
EmployeeTimeSheet_2012.xlsm
View 2 Replies
View Related
Jun 25, 2008
I have a user form that when a command button is clicked it enters the data from the from into coloums a,b,c,etc. I have code to do this but I want to add code to add a static date in coloum B based on if coloum A had data entered from the form. I need the date not to change to current date when the file is reopened. I am trying to elimate a date text box in the form. I have a link to the file http://www.box.net/shared/zdtsjv0qos
View 7 Replies
View Related
Sep 11, 2009
I built a formula that should work, but it's too long so I need to condense it.
I have three columns, column 1 has names, column 2 has a formula.
I have 15 sheets, each with a name that could appear in column 1.
If the cell in column 2, sheet 1 is Bob, I want it to pull H5 from sheet bob. That works as:
=IF(A5="Bob", 'Bob Data'!H4, "Work in Progress")
But if I build that formula for all the possible names, it's too long. Is there a way to make the formula autofill with the name in cell A5
So: =IF(A5="XXXX", 'XXXX'!H4, "Work in Progress")
View 13 Replies
View Related
Sep 8, 2006
I have three cells in A2:C2 which require user to input some data.
What I want to achieve is to combine the data from A2:C2 in D2.
C2 is a field which user will input the date. He might key in 21/08/06 or
21/08/06, 30/08/06
I have tried using below formulas in D2 but without success.
=A2&" " &B2&" "&(C2)
=A3&" " &B3&" "&DAY(C3)&"/"&MONTH(C3)&"/"&YEAR(C3) (doesn't work if there are 2 dates.
I have attached a file which shows 3 scenarios if user input 1 date and 2 dates.
View 7 Replies
View Related
Apr 27, 2012
Am following the below steps to add a function that saves the last saved time of the sheet continuously:
1- Click on ALT + F11.
2- Choose This Workbook.
3- Insert a module.
4- Paste the following code:
[Code] ........
The I insert the defined function LSDate() into the cell i want the last saved date to appear in, but what happens after is that whenever i save the sheet this date doesnt update and when i click enter on the same cell it shows the error message #NAME?. So how can i solve this error and get the last save date updated instantly.
View 4 Replies
View Related
Nov 19, 2004
I would like the current date inserted automatically into a blank cell when I click on it. It will always be in the same column, but a different date on each row for that particular entry. I used to use datepicker.xla--loved it, worked great. But now I get an erroe message when I installed and tried to run it on a new pc. Does excel come with a drop-down calendar you can pick a date?
View 9 Replies
View Related
Dec 2, 2009
Kind of like what they do in airline booking web sites, where you have the option "show calendar" and you select the date from there, to avoid any possible typing mistakes. When you select the cell, a calendar or a date drop-down list should pop-up.
View 2 Replies
View Related
Feb 7, 2007
I have a spreadsheet from which i run monthly reports for aother business area. I have filters in row 2 (which is my header row) and what i want to do is filter column CH to show blanks and filter column CE to show non blanks. Then in every visible cell in column CH below the header row (row 2) i want to enter todays date - this is so a record is kept of when each row was detailed in the report. I have tried the code below (which i tried to amend (unsucessfully) from code i got here to clear some cells when i ran another filter for another report).
Sub FilterSheets_Monthly_OFMDFM()
If ActiveWorkbook.ReadOnly = True Then
MsgBox ("This filter must add the date on each row included in this return." & vbLf & vbLf & "It must be run while the workbook status is not Read Only!" & vbLf & vbLf & "Please close this spreadsheet and re-open using the password. Thank you.")
Exit Sub
End If
Dim i As Integer
Dim rng As Range
Application.EnableEvents = False
Application.ScreenUpdating = False........................
View 4 Replies
View Related
Oct 31, 2006
Is there a really easy code which will insert the current users ID into a cell adacent to the one previously completed automatically? For example if a date was entered in A2, then B2 would automatically be completed with the user identity?
View 7 Replies
View Related
Aug 15, 2014
With "sheet1" there's a table c14:m38 with all formulas. But i want to expand the table if cell c38 contains a value or text.
Is it possible to automaticly insert a row containing the above formulas in row c14:m14?
View 12 Replies
View Related
Mar 12, 2014
I was trying to use a modified version of JBeaucaire's code to achieve the same results within my form. In my workbook I have a a table (called Table27) that ranges from A7:CL109
This is the code I'm attempting to use:
[Code] .....
Column A is where my target cells are... where the user will enter data. In cell CI (the 87th column) I want the Data & Time stamped.
I thought I'd modified the formula correctly, but I can't seem to get it to work.
View 7 Replies
View Related
May 29, 2013
I want to enter the word 'Closed' in cell B1 when the due date in cell A1 is exceeded by 272 days. I have tried using conditional formatting and excel accepts the formula but nothing seems to happen. Here is what I have tried;
B1=IF(A1<=NOW()-272,"Closed")
View 4 Replies
View Related
Apr 14, 2014
I have the the following spreadsheet: [URL] My formula in Columns A to E is the following:
=IF(ISNA(VLOOKUP(Query1_2[@Branch],Master!A:J,10,FALSE)),"Branch Not Open",VLOOKUP(Query1_2[@Branch],Master!A:J,10,FALSE))
I would like to do the following in Column A: If the date in Column C is greater than today, then Column A must also say "Branch Not Open". I have tried the following:
=IF(ISNA(VLOOKUP(Query1_2[@Branch],Master!A:J,10,FALSE)),"Branch Not Open",VLOOKUP(Query1_2[@Branch],Master!A:J,10,FALSE)),IF(C:C<=TODAY,"Branch Not Open, IF(AND(C:C=>TODAY,VLOOKUP(Query1_2[@Branch],Master!A:I,9,FALSE)))
But Excel does not like the formula at all.
View 1 Replies
View Related
Jul 10, 2006
I have 6 Headings in excel named...
"A" in cell A1, B in B1, "C" in C1, "D" in D1, "E" in E1 and "F" in F1.
There are two projects.
Project 1 has phase A, D & F and Project 2 has phase A, B, C, D & E.
My Specification follows...
1). Take Prject 1 - Which starts from A...in cell A2 I will keyin "A". When the phase comes to an end I will key in the end date of the phase. As soon as I key in the end date in cell A2 Letter D should automatically appear in the cell D2 and when Phase D comes to an end I will key in the end date in Cell D2 which should automatically keyin F in the cell F2. and is the same case for Project 2.
View 3 Replies
View Related
Aug 8, 2014
Is it possible to insert text an a cell value in conditional formating, i,e Ive got the conditional formatting:
=AND(H$4>=$B5;H$4<=$C5)
I want to insert this text whenever this condition is true once and not to repeay it:
="Load " &TEXT(G$5;"dd-mmmm") -- where G$5 is a vallue cell_
View 1 Replies
View Related
Oct 19, 2009
I was wondering if someone might be able to assist me with using VB to insert a new row below a cell containing specific text.
For example:
- All of my data is in column A
-I want to scan all of column A, and if there is a cell that contains "ACHCAMERIGROUP M", then I want a blank row inserted below it. If column A does NOT contain that text....do nothing.
View 5 Replies
View Related
Jan 13, 2012
I'm trying to write a bit of to take a text string collected from an inputbox, and paste it into a specific cell.
Should be easy but where my text string from the inputbox is "XYZ", when it enters it into the required cell it enters it as " ="XYZ" ".
Attempt at code is below -
Code:
Sub EmailEdit()
Dim Response As String
Response = Application.InputBox("Input administrator email address", , , , , , , 2)
'Check to see if Cancel was pressed.
If Response = "" Then
[Code] .....
View 2 Replies
View Related
May 10, 2009
I need a nudge in the right direction with how to amend the below code so that it :
1: cycles though all cells in a workbook, and sees whether the text reference of the cell contains a picture filename (i.e. searches for .png or .jpg in the cell contents)
3: if (1) is correct, it retrieves the picture from "C:/Users/jeff/Documents/Standards/" and pastes it as a cell comment background in the cell to the right (and overwrites any comment backgrounds that might already exist there)
The code below does something a bit different: it looks in a defined range, then adds a comment with a background picture retrieved based on the text in the cell to the left.
I'm sure this is a pretty basic change, but my VBA skills aren't up to it...I've only just started reading though Walkenbach's Power Programming! I'm using Excel 2007
Sub InsertComment()
'www.contextures.comxlcomments03.html
Dim rngList As Range
Dim c As Range
Dim cmt As Comment
Dim strPic As String
On Error Resume Next
Set rngList = Range("A1:A5")
strPic = "C:/Users/jeff/Documents/Standards/"
On Error Resume Next
For Each c In rngList
With c.Offset(0, 1)...................
View 9 Replies
View Related