Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Insert Date
Hello all:
How can I use a formula to insert a date in a cell the last time something was used. I have in chart which I enter codes. For E.G. from A1:A10 I enter codes. And in B1:B10 I have a list of all kinds of codes. I want the formula to enter a date in C1:C10 the date the code was used. So if I enter today in cell A1 the code 239, then in C5 which is next to B5 which contains the code "239" it should insert the date 5/10/09. And evrytime I use it again it should insert the newer date. Any help is appreciated. Thanks. |
#2
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Insert Date
Set the Security level to low/medium in (Tools|Macro|Security). Right click
on the sheet tab and 'view code' and paste the below code OR launch VBE using Alt+F11. Double click the sheet tab and paste the code.. Private Sub Worksheet_Change(ByVal Target As Range) Dim lngRow as Long If Target.Column = 1 And Target.Row < 11 Then lngRow = WorksheetFunction.Match(Target.Value, Range("B1:B10"), 0) If lngRow 0 Then Range("C" & lngRow) = Date End If End Sub If this post helps click Yes --------------- Jacob Skaria "art" wrote: Hello all: How can I use a formula to insert a date in a cell the last time something was used. I have in chart which I enter codes. For E.G. from A1:A10 I enter codes. And in B1:B10 I have a list of all kinds of codes. I want the formula to enter a date in C1:C10 the date the code was used. So if I enter today in cell A1 the code 239, then in C5 which is next to B5 which contains the code "239" it should insert the date 5/10/09. And evrytime I use it again it should insert the newer date. Any help is appreciated. Thanks. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Insert Date | Excel Discussion (Misc queries) | |||
How can I insert a date with an icon (calendar) insert | Excel Discussion (Misc queries) | |||
insert date | Excel Worksheet Functions | |||
Insert new date once. | Excel Worksheet Functions | |||
Automatically Insert DATE, so that DATE will NOT change | Excel Worksheet Functions |