Forum

Notifications
Clear all

Dates and IF/OR function

4 Posts
3 Users
0 Reactions
60 Views
(@hprice)
Posts: 2
New Member
Topic starter
 

Hello,

I have 3 columns of dates that I need to look at if the first date is an error.

If there is a date in cell M11, then look in column N11 and subtract 5 days, If there is an error, "#N/A" then look in cell L11 and subtract 5 days

I have written a formula, but it returns the L12-5 for every answer regardless if there is a date in M11.

=IFERROR(DATEDIF(M12="MM/DD/YY","",N12-5),(L12-5))

 

Please help,

HPrice

 
Posted : 19/04/2019 10:44 am
(@hprice)
Posts: 2
New Member
Topic starter
 

I also tried this formula- and it returned an error. #N/A

=IF(OR(M11="#N/A",L11=MM/DD/YY,L11-5),(M11=MM/DD/YY,N11-5))

 
Posted : 19/04/2019 10:46 am
Anders Sehlstedt
(@sehlsan)
Posts: 968
Prominent Member
 

Hello,

Please upload a sample file, it makes it a lot easier for any of us to check and try to help.

 
Posted : 19/04/2019 4:04 pm
Philip Treacy
(@philipt)
Posts: 1629
Member Admin
 

Hi Hope,

As Anders said, it's always better to supply a workbook with the data to make out lives easier to help you 🙂

But, try this

=IF(ISERROR(M11),L11-5,N11-5)

What you haven't said (and the workbook may help here) is why are you specifically looking for a #N/A error?  Why not any error?

What do you want to happen if M11 is empty, or can it contain something else like text or a number?

Regards

Phil

 
Posted : 19/04/2019 7:45 pm
Share: