variance differences formula

Neomatrix

New Member
Joined
Feb 3, 2021
Messages
25
Office Version
  1. 365
  2. 2019
  3. 2016
Platform
  1. Windows
  2. Mobile
Hi,
With formula in cell E2 I have covered almost all scenarios needed in our finance report for variance analysis, except first two scenarios which has to be included in formula as well.
1. case is if first number is positive and second negative, give me =100%
2. case is if first number is negative and second is 0, give me =-100%
Inside formula there is also max percentage 999%. I have solved all other requested scenarios except additional first two cases which has to be incorporated inside formula
Thank you
1717605717966.png
 

Excel Facts

Control Word Wrap
Press Alt+Enter to move to a new row in a cell. Lets you control where the words wrap.
It may be good for the forum if you posted the other accurate scenarios and results so the forum doesn't step on a correct portion of your calculation. But on the surface, why not just wrap what you have with two IF(AND()) functions,
Excel Formula:
IF(AND(B2>0,C2<0),1,if(AND(B2<0,C2=0), -1,   ... the rest of your formula ....   ))
 
Upvote 0
It may be good for the forum if you posted the other accurate scenarios and results so the forum doesn't step on a correct portion of your calculation. But on the surface, why not just wrap what you have with two IF(AND()) functions,
Excel Formula:
IF(AND(B2>0,C2<0),1,if(AND(B2<0,C2=0), -1,   ... the rest of your formula ....   ))
thank you, but it is not working inside formula
 
Upvote 0
Hi,
With formula in cell E2 I have covered almost all scenarios needed in our finance report for variance analysis, except first two scenarios which has to be included in formula as well.
1. case is if first number is positive and second negative, give me =100%
2. case is if first number is negative and second is 0, give me =-100%
Inside formula there is also max percentage 999%. I have solved all other requested scenarios except additional first two cases which has to be incorporated inside formula
Thank you
View attachment 112321
It may be good for the forum if you posted the other accurate scenarios and results so the forum doesn't step on a correct portion of your calculation. But on the surface, why not just wrap what you have with two IF(AND()) functions,
Excel Formula:
IF(AND(B2>0,C2<0),1,if(AND(B2<0,C2=0), -1,   ... the rest of your formula ....   ))
thank you, but it is not working inside formula
1717613713582.png
 
Upvote 0
Hi,
With formula in cell E2 I have covered almost all scenarios needed in our finance report for variance analysis, except first two scenarios which has to be included in formula as well.
1. case is if first number is positive and second negative, give me =100%
2. case is if first number is negative and second is 0, give me =-100%
Inside formula there is also max percentage 999%. I have solved all other requested scenarios except additional first two cases which has to be incorporated inside formula
Thank you

Here is full screen
1717613756955.png
 
Upvote 0
It may be good for the forum if you posted the other accurate scenarios and results so the forum doesn't step on a correct portion of your calculation. But on the surface, why not just wrap what you have with two IF(AND()) functions,
Excel Formula:
IF(AND(B2>0,C2<0),1,if(AND(B2<0,C2=0), -1,   ... the rest of your formula ....   ))
Only first scenario is not working, I have no idea why? (marked yellow)

1717615676501.png
 
Upvote 0
How can you have -0? Zero is neither positive nor negative.
 
Upvote 0
Your IF statements are a bit convoluted so can't really decipher, but this gives the expected result.
Book1
BCD
1
2-150.000.00-100%
3100.000.00100%
40.00200.00-100%
50.00-250.00100%
60.350.00999%
Sheet7
Cell Formulas
RangeFormula
D2:D6D2=IFERROR(MIN(999%,-SIGN(C2)*(C2-B2)/C2),SIGN(B2))
 
Upvote 0
Solution
Your IF statements are a bit convoluted so can't really decipher, but this gives the expected result.
Book1
BCD
1
2-150.000.00-100%
3100.000.00100%
40.00200.00-100%
50.00-250.00100%
60.350.00999%
Sheet7
Cell Formulas
RangeFormula
D2:D6D2=IFERROR(MIN(999%,-SIGN(C2)*(C2-B2)/C2),SIGN(B2))
ohh my God, you are genious!!!! Thank you!
 
Upvote 0

Forum statistics

Threads
1,224,819
Messages
6,181,153
Members
453,021
Latest member
Justyna P

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