Adding the date automatically when an input is inputted

alikishi

New Member
Joined
May 5, 2012
Messages
3
Without using Macros and VBA, is there a way for the date to automatically come out when a cell already has something inside it? For example:

Let's say I want A2 to show today's date if some information is inputted in cell A1.

=if(not(isblank(A1)),today(),"") will not work because it will always show the current date and not the date when information was inputted in cell A1.

Thank you everyone!
 

Excel Facts

Lock one reference in a formula
Need 1 part of a formula to always point to the same range? use $ signs: $V$2:$Z$99 will always point to V2:Z99, even after copying
Hi,

Indeed ... with =IF(A1<>"",TODAY(),"")

You have to manually take care of the cell format AND copy paste values ...

Much easier to have an event macro ... :smile:
 
Upvote 0
If you want a static date, then you will to do it manually, or with VBA.
Whilst i believe it is possible to do it with a formula, you would have to turn on iterative calculation.
 
Upvote 0
Should you want to test the event macro

Code:
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Count > 1 Then Exit Sub
If Target.Column <> 1 Then Exit Sub
With Target
    .Offset(0, 1) = Date
    If .Value = "" Then .Offset(0, 1).ClearContents
End With
End Sub

Hope this will help
 
Upvote 0

Forum statistics

Threads
1,224,222
Messages
6,177,221
Members
452,765
Latest member
Erka Gizli

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