Nested IF Statement Calculation Detection

Dijnero

New Member
Joined
Mar 9, 2011
Messages
5
Hi, I often have to use nested IF statements for my work. I don’t always get the desired results that I want due to an error in my statements. Sometimes it is not easy to tell where the calculation is coming from. Is there a way to easily identify the calculation in the IF statements that is being used?

Thanks
 

Excel Facts

Best way to learn Power Query?
Read M is for (Data) Monkey book by Ken Puls and Miguel Escobar. It is the complete guide to Power Query.
After the fact, no.
During development, yes.

If I am working on a complicated IF statement, I might work with formulas like =IF(SUM(A1:A10)=$B$1, IF($C23=4, "a", "b"), "c")

Looking to see if the result is a, b, or c will let me know if the logic is correct. Then I can substitute formulas that return the actual values that I want for the constants.
 
Upvote 0
Very Simply:

=If(Condition, Value returned if condition is met, Value returned if Condition is Not Met)

If there are multiple nested ifs, you can highlight each part of your formula example: Highlight either the condition or the value if true or the value if false and press F9 to see how it works, then press ctrl+z to undo or escape, do not press enter after F9, you will have to re-write the formula.
 
Upvote 0
You can always use the Formula Evaluator..

in XL2003
Tools - Formula Auditing - Evaluate Formula
 
Upvote 0
You can highlight various parts of the formula in the formula bar at the top of the screen. Once highlighted, hit F9. This is a simple way to see which conditions are being met. Good for auditing formulas.
 
Upvote 0

Forum statistics

Threads
1,203,352
Messages
6,054,910
Members
444,759
Latest member
TeckTeck

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