excel datevalue and ifs function together

Copper Contributor

How do I input that only if there is a date in a51 then I want to subtract c51:c82-e51:e82=f51:f82

2 Replies

@Josh_BrewerJoshBrewe Dates in Excel are numbers. So, checking for a numerical value in A51 could do that trick, though there is no guarantee that a number is always a valid date for your analysis. Use Data Validation to set a range for acceptable dates.

 

If you are on Excel MS365 or 2021 you could use:

=IF(ISNUMBER(A51),C51:C82-E51:E82,"No date in A51!")

in F51.

 

Otherwise,

=IF(ISNUMBER($A$51),C51-E51,"No date in A51!")

 in F51 and copy it down.

Example file attached.

Thank you sir, I'll try that as soon as i get up, it's nap time I've been at this all night. I'm not real tech savy, so it's been kicking my but making this spreadsheet. Much appreciated! @Riny_van_Eekelen