nested IF

SamS

Well-known Member
Joined
Feb 17, 2002
Messages
542
Having trouble putting together a nested IF statement, it all depends on whether the cell G8 is in error or not, probably a better way to do it. Here are the 2 formula I need nested:

=IF(AND(ISERROR(F8),ISERROR(G8)),E8+F11,#N/A)

=IF(AND(ISERROR(F8),NOT(ISERROR(G8))),E9+F11)

thnx
 

Excel Facts

Which Excel functions can ignore hidden rows?
The SUBTOTAL and AGGREGATE functions ignore hidden rows. AGGREGATE can also exclude error cells and more.
I'm an Excel rookie in comparison to a lot of folks here, but I think one of these will work, depending on which answer you want when the conditions aren't met...

=IF(ISERROR(F8),IF(ISERROR(G8),E8+F11,"#N/A"),E9+F11)

=IF(ISERROR(F8),IF(ISERROR(G8),E8+F11,E9+F11),"#N/A")
 
Upvote 0
chowell45014, Aladin thanks for your responses, unfortunately found that while the formulae worked while F8 was not inerror and G8 was in error but when both cells were in error then none of the formulae worked.

I have modified the formula like this as I want two conditions met.

1st condition is where F8 is not in error and G* is in error
2nd condition is where both F8 & G7 are in error

=IF(AND(ISERROR(G8),NOT(ISERROR(F8))),IF(AND(ISERROR(F8),ISERROR(G8)),E8,E9)+F11,NA())

All attempts have resulted in a #N/A on the second condition.

Frustrated as I can apply each one individually and get it to work but not together. Unfortunately can't use Colo's download at work due to restrictions by our IT dept.
 
Upvote 0
F8 & G7? What happened to F8 and G8?

To clarify:
If F8 is ERROR and G8 is Error then E8+F11
If F8 is ERROR and G8 is Not Error then E9+F11
Any other combination is #N/A

Is this correct?

What kind of errors are you expecting?
 
Upvote 0
Hot Pepper

forgive me - a little dyslexic today - should be F8 & G8

your explanation is what I am after - not expecting to get errors but am getting #n/a when applying any of the formula yet breaking the formula up and applying individually not getting any errors but getting the expected figure.

thanks
 
Upvote 0
How does Aladin's answer not work?

What I meant by what kind of errors you're expecting, you're using ISERROR so you must be expecting some kind of error in the cells.
 
Upvote 0
again I wasn't succint - it returned the correct value if F8 was not in error but not if it was in error

I have to logoff but will check back later
 
Upvote 0

Forum statistics

Threads
1,225,852
Messages
6,187,392
Members
453,424
Latest member
rickysuwadi

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