how can I return todays date (today() ) in an if function

S

Sally

I am using an "if" function & when it is true I want to return todays date,
all I can get it to return is =today(), please can someone suggest anything
Thanks
Sally
 
P

Pete_UK

I presume you have something like:

=IF(condition,TODAY(),"")

Format the cell in date format.

Hope this helps.

Pete
 
S

Sally

my formula lokks like below;
=if(condition,""," ","=today()")
if the cell is empty return blank if not return todays date, when using the
above formula it returns =today() instead of the date....
 
P

Pete_UK

Sally,

by putting =today() in quotes, you are turning this into text - the
quotes are not need, neither is the equals sign. Also, you have too
many parameters. Try something like:

=IF(A1="","",TODAY())

which means if A1 is blank then return a blank, otherwise return
today's date.

Hope this helps.

Pete
 
C

CLR

Some variation of this might be what you want. With it, the date will not
change tomorrow when you open the file........

Private Sub Worksheet_Change(ByVal Target As Excel.Range)
If Range("a1").Value = "True" Then
ActiveCell.FormulaR1C1 = Date & " " & Time
End If
End Sub


Vaya con Dios,
Chuck, CABGx3
 
Top