# Thread: IF with nested OR so ifTRUE result can do one of two things

1. Attached is spreadsheet where in I2 needs to look at EITHER D2 or E2 and if there is a date in either, add 182 to that date. (Note, a date will not be entered into both). If there both D2 & E2 are blank, then I2 to show N/A.

Can you help please? The formula i have created so far can only add 182 to D2, i cant find how to have an OR for the addition of the 182 in I2.

=IF(OR(ISBLANK(\$D2),(ISBLANK(\$E2)),"N/A",\$D2+182)

Many thanks

Webmistress

2. Since dates are seen by Excel as numbers you could use the following (in I2):

=IF(OR(D2>0,E2>0),MAX(D2:E2)+182,"N/A")

It checks to see if there is a date (number) in either of the two cells and if there is a date in either one of the cells it adds 182 to the maximum date. Since one of the cells will not have a date, the 182 gets added to the cell with the date.

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•