Search code examples
excelif-statementformulalast-modified

How can I use a formula with an IF function?


I'm wanting to check for blank cells, and when the cell is not blank, output a formula. However, I am getting errors and I believe you're not allowed to use formulas within an IF function, are you guys able to help me out?

=IF(A1="","",=lastModified(A1))

If the cell is not empty, this formula will return the date the cell was last modified. I do not want the date updated if the cell is blank.

Thanks for the help.


Solution

  • If you want to call the formula, just remove the equals sign. It will call when the FALSE condition triggers in your IF statement.

    =IF(A1="","",lastModified(A1))