HELP on IF Statement

Divablair

New Member
Joined
Feb 21, 2018
Messages
6
=IF('Quarterly Data'!C351> Goals!$Q$45,0,(IF('Quarterly Data'!C395=0,"N/A",(IF((('Quarterly Data'!C351/Goals!$Q$45)-1)=(-1),(100),(ABS(('Quarterly Data'!C351/Goals!$Q$45)-1))*100)))))

Could someone tell me what the -1, (100) is?

So when I calculate the formula (131.511 / 206.076653) I get .6381 then when I take that number and -1 I get 0.3618 *100 for 36.18

Why do we -1? why wouldn't you take .6381*100 for 63.81?


I am just trying to understand why it was written like this so I can verify numbers in a spreadsheet.
 

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.
Hi @Divablair,
The if statements are working from left to right and depending on the results the -1 will come in to play. So, the first part 'Quarterly Data'!C351> Goals!$Q$45,means that if this is true then the cell displays 0. If that case is false, then the next if statement kicks in. I would say that based on the first statement, the formula is measuring the amount missed of the goal versus the percentage met. So 100% made would display as 0% missed. I think that answers the question here, but I will continue to explain the logic in the following if statements.

The next statement is if quarterly data is 0 to start with which results to "n/a". I would have this statement first in the nested if situation, but that's just preference. The third if isolates the scenario to if quarterly date/goals -1 equals -1. I believe this is redundant to the 2nd if because if quarterly data = 0 then the result would be -1. I think you can remove that third if statement because that scenario wouldn't occur.
The final if statement is only in play if the first three are already false which means that only certain conditions are remaining for the calculation to work. The final if is used to display the amount of miss versus the amount made. It only is true if the quarterly data is less than goal and is greater than 0.
 
Upvote 0

Forum statistics

Threads
1,223,896
Messages
6,175,264
Members
452,627
Latest member
KitkatToby

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