Nested if formula

ADAMC

Well-known Member
Joined
Mar 20, 2007
Messages
1,169
Office Version
  1. 2013
Platform
  1. Windows
Hi all,

I wonder if someone can help me with a formula please I cannot get my head around it so its best to write it in words: It is so difficult to explain my actual spreadsheet but here goes:

The formula would be filled down the column starting in O2

If the date in E2 IS LESS THAN OR EQUAL TO TODAYS DATE THEN TODAYS DATE + N2, IF THE DATE IN E2 IS GREATER THAN TODAYS DATE THEN E2 + N2, IF N2 IS BLANK THEN "" (BLANK)

Thank you
 

Excel Facts

How can you turn a range sideways?
Copy the range. Select a blank cell. Right-click, Paste Special, then choose Transpose.
this is exactly what you're asked for but made no sense as both conditions for E2 ended up with today() + N2

=if(N2="","",if(E2<=today(),today()+N2,today()+N2))
 
Last edited:
Upvote 0
Thanks for replying.

So I tried something similar and I get a circular reference error and I cant figure out why it looks like its the today() part that causes the error?

the date in E2 can either be a date in the past or a date ahead so the second part I think should be like this:

=if(N2="","",if(E2<=today(),today()+N2,E2()+N2)) however this also gives a circular error.
 
Last edited:
Upvote 0
So I tried something similar and I get a circular reference error and I cant figure out why it looks like its the today() part that causes the error?
So, you are putting that formula Alan came up with in cell O2, right?
What exactly is in cells E2 and N2?
Are either formulas? If so, please post the formula(s).

I think the formula should probably look like this:
Code:
[COLOR=#333333]=if(N2="","",if(E2<=today(),today()+N2,[/COLOR][COLOR=#ff0000]E2[/COLOR][COLOR=#333333]+N2))[/COLOR]
 
Upvote 0
just saw Joe's post, he is correct
 
Last edited:
Upvote 0
Joe, apologies I was actually putting the formula in the wrong place, it was E2+ N2 as you said.

Thank you AlanY exactly what I needed.
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,181
Members
453,022
Latest member
Mohamed Magdi Tawfiq Emam

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top