Nested IF with IFERROR

detriez

Board Regular
Joined
Sep 13, 2011
Messages
193
Office Version
  1. 365
Platform
  1. Windows
I am trying to populate the current cell as follows while keeping the IFERROR statement
My logic is:
If H7="BASIC" then current cell ="BASIC"
If H7=<1 then current cell ="HYB"
Else H7/G7*100

This will only work on error or if H7=BASIC

Code:
=IFERROR((IF(H7="BASIC","BASIC",IF(H7<1,"HYB"))(H7/G7*100)),0)
 

Excel Facts

Why does 9 mean SUM in SUBTOTAL?
It is because Sum is the 9th alphabetically in Average, Count, CountA, Max, Min, Product, StDev.S, StDev.P, Sum, VAR.S, VAR.P.
How about this:

=IFERROR(IF(H7="BASIC","BASIC",IF(H7<1,"HYB",(H7/G7)*100)),0)
 
Upvote 0
try doing it in helper cells on the sheet

=if(iserror(if(h7="basic","basic",if(h7<1,"hyb",h7/g7*100))),"error",if(h7="basic","basic",if(h7<1,"hyb",h7/g7*100)))

then put the value wherever with your macro
 
Upvote 0
Both of these mostly work. I need the current cell to be 0 if H7 is blank. Right now it populates with "HYB"
 
Upvote 0
Then perhaps this:

=IFERROR(IF(H7="BASIC","BASIC",IF(H7<1,"HYB",IF(H7="",0(H7/G7)*100))),0)
 
Last edited:
Upvote 0
Excel auto corrected to this which returned "FALSE" in the current cell
Code:
=IFERROR(IF(H7="BASIC","BASIC",IF(H7<1,"HYB",IF(H7="",0[COLOR=#ff0000]*[/COLOR](H7/G7)*100))),0)

I tried this but, it didn't work either
Code:
=IFERROR(IF(H7="BASIC","BASIC",IF(H7<1,"HYB",IF(H7="",0[COLOR=#ff0000],[/COLOR](H7/G7)*100))),0)
 
Upvote 0
This works!
I changed the order of the evaluation of H7.. not sure why but, it works. Thanks for your help guys

Code:
=IFERROR(IF(H7="BASIC","BASIC",IF(H7="",0,IF(H7<1,"HYB",(H7/G7)*100))),0)
 
Upvote 0

Forum statistics

Threads
1,225,375
Messages
6,184,613
Members
453,247
Latest member
scouterjames

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