"Date" Function using "If"

scooters8

New Member
Joined
Nov 2, 2005
Messages
2
I am creating a small database in excel to hold records I will add to over the next few years. When I create a new record and type in a home address, I want today's date to automatically populate in a different cell. I am currently using the formula: =IF(A1,TODAY()," ").

However I am experiencing a problem because the date will not remain constant. It will always reflect the current date instead of the date that I entered the record.

How can I have the current date automatically generate when I enter an address in a seperate cell, and keep that date constant?

Thanks![/img]
 

Excel Facts

What do {} around a formula in the formula bar mean?
{Formula} means the formula was entered using Ctrl+Shift+Enter signifying an old-style array formula.
You can input it manually, using shortcut keys:
Current date Select a cell and press CTRL+;
Current time Select a cell and press CTRL+SHIFT+;
Current date and time Select a cell and press CTRL+; then SPACE then CTRL+SHIFT+;

or:
1. Press Alt-F11 to bring up VBA
2. In the left pane, double-click the sheet you want to attach this to
3. In the right pane, paste this in (change the addresses as required):

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address = "$A$1" Then [b1] = Date
End Sub
 
Upvote 0

Forum statistics

Threads
1,224,885
Messages
6,181,588
Members
453,055
Latest member
cope7895

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