Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks for the answer Bob but I still can't get it to work.
It's probably just me. I don't understand the code. It's column H that we're putting initials of whoever enters the information into the spreadsheet in and column I that we want the date to automatically appear in. We managed to get it to automatically put in a date, but everytime a new cell in column H was filled the date went into the next cell in I but it changed all the dates in that column to match. I'm hoping that it is possible to sort this out and I REALLY appreciate your help. Thanks, Nikki "Bob Phillips" wrote: Private Sub Worksheet_Change(ByVal Target As Range) Const WS_RANGE As String = "H1:H10" '<== change to suit On Error GoTo ws_exit Application.EnableEvents = False If Not Intersect(Target, Me.Range(WS_RANGE)) Is Nothing Then With Target .Offset(0, 1).Value = Date .Offset(0, 1).NumberFormat = "dd mmm yyyy" End With End If ws_exit: Application.EnableEvents = True End Sub 'This is worksheet event code, which means that it needs to be 'placed in the appropriate worksheet code module, not a standard 'code module. To do this, right-click on the sheet tab, select 'the View Code option from the menu, and paste the code in. -- HTH Bob (there's no email, no snail mail, but somewhere should be gmail in my addy) "nikkiamii" wrote in message ... I am trying to get excel to automatically insert a date in a cell when the cell next to it is filled. I've tried using the IF and NOW functions but I don't think I can use them together. Please help because I don't seem to be able to find an answer anywhere! |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Formula Problems | Excel Discussion (Misc queries) | |||
aauugghhh...#div/o problems & various average formula problems | Excel Worksheet Functions | |||
formula problems | Excel Discussion (Misc queries) | |||
Formula problems | Excel Programming | |||
Formula problems!! | Excel Programming |