A family of Microsoft spreadsheet software with tools for analyzing, charting, and communicating data.
slight change in syntax:
=IF(B2="","",IF(B2="N/A","",B2-A2))
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
I am trying to create a nested IF function in Excel 2010 so, if the date in cell B2 is empty, then the elapsed number of days in cell C2 stays empty, and if cell B2 contains an "N/A" text value, the cell C2 stays empty; but if cell B2 does contain a date, the cell C2 shows the elapsed number of days
Here’s my formula so far:
=IF(B2="","",IF(B2="N/A"),"",B2-A2)
Here’s what I need:
6/6/12 6/7/12 1
6/6/12 “”
N/A “”
A family of Microsoft spreadsheet software with tools for analyzing, charting, and communicating data.
Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.
Answer accepted by question author
slight change in syntax:
=IF(B2="","",IF(B2="N/A","",B2-A2))
This works. Thanks, Mr. Student!
Just move your closing bracket to the end
=IF(B2="","",IF(B2="N/A","",B2-A2))
Alternatively use the OR
=IF(OR(B2="",B2="N/A"),"",B2-A2)