Nested if statement that has different criteria with different outcomes

Meucci98

New Member
Joined
Jan 12, 2015
Messages
18
Hi there I cannot seem to figure this out for the life of me.

I am getting a Div0 error with the following formula and cannot figure out how to get rid of it.

Does anyone have any ideas?

<tbody>
</tbody>



<colgroup><col span="5"><col></colgroup><tbody>
</tbody>
COLUMN A (TOTAL)COLUMN B COLUMN C (COSTS 1)COLUMN D (COSTS 2)COLUMN E (COST TO COMPLETE)COLUMN F
1AB1=IF(B2="BC",(A2+C2)/E2,IF(B2="AB",(A2+D2)/E2,"-"))
2BC2

<tbody>
</tbody>
 

Excel Facts

What is =ROMAN(40) in Excel?
The Roman numeral for 40 is XL. Bill "MrExcel" Jelen's 40th book was called MrExcel XL.
you are placing 0 value under the fraction. that is why you are getting div 0 error
what is your question?

edit: E2 is blank and blank = 0 in value.
 
Last edited:
Upvote 0
In column F, I do not want it to return Div0 error even though column E remains empty. Does that help?
 
Upvote 0
What do you want in column F?
0?
empty cell?
or what?
if you want 0 then =IFERROR(G2/H2,"0")
if you want empty cell then =IFERROR(G2/H2,"")
if you want whatever then =IFERROR(G2/H2,"whatever")

hope that help
 
Upvote 0

Forum statistics

Threads
1,216,473
Messages
6,130,838
Members
449,597
Latest member
buikhanhsang

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