Date in an IF Statement

kevinh2320

Board Regular
Joined
May 13, 2016
Messages
61
I need help with a formula that will return the current date when a specific selection is made from a dropdown list. For example: I put the formula below is cell A2 but it doesn't work and not sure how to resolve.

if(A1="emailed",=Date(),"")
 

Some videos you may like

Excel Facts

Easy bullets in Excel
If you have a numeric keypad, press Alt+7 on numeric keypad to type a bullet in Excel.

Joe4

MrExcel MVP, Junior Admin
Joined
Aug 1, 2002
Messages
55,975
Office Version
  1. 365
Platform
  1. Windows
In a formula, it would look like:
=if(A1="emailed",Today(),"")
However, note that this will ALWAYS return the current date. So if you opened this tomorrow, it would show tomorrow's date.

If you want it to freeze with the date A1 was changed to "email", and that date not to change when you open the file tomorrow, then you need to use VBA to hard-code the date in there (as TODAY() will ALWAYS return the current date). There are hundreds (if not thousands) of threads on this forum that deal with that "date stamping".
 

kevinh2320

Board Regular
Joined
May 13, 2016
Messages
61
Thank you. This worksheet will be uploaded to OneDrive so don't think VBA will work.
 

Joe4

MrExcel MVP, Junior Admin
Joined
Aug 1, 2002
Messages
55,975
Office Version
  1. 365
Platform
  1. Windows
Thank you. This worksheet will be uploaded to OneDrive so don't think VBA will work.
If you need that date to never change once it is added, without VBA, your only choice is to add it manually.
Cells can either contain formulas or hard-coded values, but never both at the same time.
 

Watch MrExcel Video

Forum statistics

Threads
1,123,514
Messages
5,602,093
Members
414,501
Latest member
mdhaumyu

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
Top