Something about forest and trees?

pilot

Active Member
Joined
Feb 17, 2002
Messages
345
Why can't I figure this out?

=IF(F402,IF(LEN(B402<9),IF(C402<501,C402*0.01,5+(C402-500)*0.006),33),"")

When LEN(B402<9 is FALSE, I want 33 as the result but I'm getting "".

Thanks for your assistance.
 
Sure, Joe.

This formula goes in K1.

If anything is in A1, complete the following tests, else display blank
If LEN B1<9 = TRUE,
If C1<501 = TRUE, C1*0.01
If C1<501 = FALSE, 5+(C1-500)*0.006
If LEN B1<9 = FALSE, C1

I think this shows all conditions. Thanks again for your assistance.
 
Upvote 0

Excel Facts

Quick Sum
Select a range of cells. The total appears in bottom right of Excel screen. Right-click total to add Max, Min, Count, Average.
OK, let's build it piece-by-piece, so you can see how it all works:
If anything is in A1, complete the following tests, else display blank
So, we start off with (just using "x" as a place-holder for the true statement):
Code:
=IF(A1,[COLOR=#ff0000][B]x[/B][/COLOR],"")
If LEN B1<9 = TRUE,
...
If LEN B1<9 = FALSE, C1
So we replace the "x" in our first formula with:
Code:
IF(LEN(B1)<0,[COLOR=#ff0000][B]y[/B][/COLOR],C1)
where y is our new placeholder.
So making that substitution now looks like:
Code:
=IF(A1,IF(LEN(B1)<0,[COLOR=#ff0000][B]y[/B][/COLOR],C1),"")
Lastly, we have this part:
If C1<501 = TRUE, C1*0.01
If C1<501 = FALSE, 5+(C1-500)*0.006
which would just look like:
Code:
IF(C1<501,C1*0.01,5+(C1-500)*0.006)
So substituting that in to "y" in our formula above yields:
Code:
=IF(A1,IF(LEN(B1)<0,IF(C1<501,C1*0.01,5+(C1-500)*0.006),C1),"")

So that is how you build a nested IF formula!
 
Upvote 0
Try
Code:
=IF(A1<>"",IF(LEN(B1)<9,IF(C1<501,C1*0.001,5+(C1-500)*0.006),C1),"")
 
Upvote 0
You are welcome.
I hope breaking it down like I did allowed you to follow along and make sense.
 
Upvote 0

Forum statistics

Threads
1,223,236
Messages
6,170,917
Members
452,366
Latest member
TePunaBloke

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