nested IF

SamS

Well-known Member
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

How to create a cell-sized chart?
Tiny charts, called Sparklines, were added to Excel 2010. Look for Sparklines on the Insert tab.
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")

Maybe...

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

Aladin, this was the one that I wanted, thanks again

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.

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?

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

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.

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

But isn't this what you want?
Book3
EFGHI
811#N/A#N/A15
916
10
114
Sheet1
Book3
EFGHI
8110#N/A#N/A
916
10
114
Sheet1
Book3
EFGHI
811#N/A020
916
10
114
Sheet1
Book3
EFGHI
81100#N/A
916
10
114
Sheet1

Replies
2
Views
520
Replies
0
Views
159
Replies
2
Views
384
Replies
1
Views
231
Replies
1
Views
292

1,207,422
Messages
6,078,438
Members
446,337
Latest member
nrijkers

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.

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

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