Comparing two or more negative numbers

silver_john

New Member
Joined
May 17, 2022
Messages
3
Office Version
  1. 365
Platform
  1. Windows
Hello Forum,

I'm desperately looking for help here.

I'm trying to set up Variance as a KPI for my team. The Variance percentage is in column F. So, if the Variance is less than +/- 1 then E column should return 5. If Variance is greater than or equal to +/- 1 but less than +/- 2, it should be 4 and anything greater than +/- 2 it should return 3.

Pradeep
 

Excel Facts

How can you automate Excel?
Press Alt+F11 from Windows Excel to open the Visual Basic for Applications (VBA) editor.
Welcome to the Board!

If you were checking the value in cell F2, try this formula:
Excel Formula:
=IF(ABS(F2)>2,3,IF(ABS(F2)>1,4,IF(ABS(F2)>=0,5,"")))
 
Upvote 0
Thank you for the quick response Joe4.

But this didn't get me the expected results. You see, the Variance score could be a positive or a negative value, while 99% of the time it would be a negative value. So when applying this formula it returns "5" for all the cells.

100.00%100.00%0.00%5
95.00%95.00%0.00%5
100.00%100.00%0.00%5
100.00%100.00%0.00%5
100.00%100.00%0.00%5
90.00%90.00%0.00%5
60.00%60.00%0.00%5
100.00%100.00%0.00%5
100.00%100.00%0.00%5
100.00%100.00%0.00%5
100.00%100.00%0.00%5
100.00%90.00%-10.00%5
95.00%90.00%-5.00%5
100.00%100.00%0.00%5
100.00%100.00%0.00%5
80.00%75.00%-5.00%5
100.00%100.00%0.00%5
90.00%80.00%-10.00%5
100.00%95.00%-5.00%5
100.00%100.00%0.00%5
100.00%90.00%-10.00%5
100.00%100.00%0.00%5
100.00%95.00%-5.00%5

Thanks in advance.
 
Upvote 0
Thanks because you didn't specify in your original post that you were dealing percentages!
Note that 1% is NOT the same as 1.
1% actually equals .01.

So you need to amend the formula like this:
VBA Code:
=IF(ABS(F2)>.02,3,IF(ABS(F2)>.01,4,IF(ABS(F2)>=0,5,"")))

If this still does not give you what you need, please post an actual data example of your data, along with the your expected results, making it clear which column the variance we are checking is located in.
 
Upvote 0
Solution
Excellent!! Sorry for missing that detail earlier. This works!

Thanks once again.
 
Upvote 0
You are welcome.
Glad I was able to help!
:)
 
Upvote 0

Forum statistics

Threads
1,214,926
Messages
6,122,305
Members
449,079
Latest member
juggernaut24

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