![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
New Member
Join Date: Mar 2002
Posts: 7
|
This has to be so simple, my brain has farted, and I cant think...
I am setting up a spreadsheet, so that when I insert data in cell A* that the date is automatically inserted in cell B* Ive used the =NOW() it works sort of. BUT! EG. if I enter data in cell A33 the date and time set in ALL earlier cells is changed to current time and date.. Thanks for ya time too. |
|
|
|
|
|
#2 |
|
Board Regular
Join Date: Feb 2002
Location: Georgia USA
Posts: 544
|
This will put the date and time in column B when you enter something in column A, take out time & " " & if you don't want the time. Hope this helps
Private Sub Worksheet_Change(ByVal Target As Excel.Range) If Target.Count > 1 Then Exit Sub Select Case Target.Column Case 1 Cells(Target.Row, 2) = Time & " " & Date End Select End Sub |
|
|
|
|
|
#3 |
|
New Member
Join Date: Mar 2002
Posts: 7
|
Sorry to sound stoopid, but this formula, where do I enter that?
If I type it into a cell, it comes up as text. Is it something special? Im using Office 97. Thanks as well for ya help. [ This Message was edited by: virtual-bird on 2002-03-05 17:00 ] |
|
|
|
|
|
#4 |
|
New Member
Join Date: Mar 2002
Posts: 7
|
OK.
I got that working in Visual Basic. Works a treat!!! Now, if I clear the data in Cell A, the date stays in Cell B. How do I clear this one. Again Extreme thanks for the help. [ This Message was edited by: virtual-bird on 2002-03-05 17:26 ] |
|
|
|
|
|
#5 |
|
Guest
Posts: n/a
|
select column B when you select your data in A and delete them at the same time, because this is in VBA it will put the date back in when you enter your data in A again
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|