time

mickdodge

New Member
Joined
Jun 17, 2008
Messages
4
i have a "IF" statement that if satisfied will enter in today's date and time. problem is that the time is volatile and keeps getting updated whenever there is a change to the spreadsheet anywhere. how do i format the time so that it doesn't continuously update?
 

Excel Facts

Can a formula spear through sheets?
Use =SUM(January:December!E7) to sum E7 on all of the sheets from January through December
You really can't with a function. You will need VBA to do this. Post your IF statement so we can see its dependent(s) and possibly code off of them.

lenze
 
Upvote 0
=IF(B162="","",NOW())

basically if B162 (in this case) has a name entered, A162 will populate date and time.
 
Upvote 0
Place this in the WorkSheet module. Right click on the sheet tab and choose "View Code" Paste in the white panel.
Code:
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Count > 1 Then Exit Sub
If Target.Column <> 2 Then Exit Sub
Cells(Target.Row, 1) = Date 'Change to Now for Date and Time
End Sub

This will place date (and time?) in column "A" when a value is entered OR changed in Column "B"

HTH
BTW: Welcome to the board!!!
lenze
 
Upvote 0

Forum statistics

Threads
1,214,648
Messages
6,120,725
Members
448,987
Latest member
marion_davis

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top