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

Can a formula spear through sheets?
Use =SUM(January:December!E7) to sum E7 on all of the sheets from January through December
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,214,585
Messages
6,120,391
Members
448,957
Latest member
Hat4Life

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