Over/Under Calculation?

Agrajag

New Member
Joined
Apr 4, 2006
Messages
47
I'm doing some data analysis where I have a group of stats for people. For example, there's a column on sales per month.

I want to be able to look at the sales numbers in various ways but one thing I want is to look at all the numbers in a column (sales per month) and get the average sales. So, I have a cell at the bottom that's the average of that column. Simple enough.

Then what I want is a column next to that column that then shows me a "grading" based on that average.

Let's so the average is 70 sales a month. Then let's compare two rows (people).

Joe has 80 sales and Bob has 60 sales. What I want to be able to show in the new column is not just a difference (ie, Joe +10, Bob -10). Instead what I want is to take the average and, IF the person's number is above the average, give them a rating of .10 per point above the average number but if it's below the average then give them a rating of -1.0 for every point below average.

Thus, in the example above, Joe would get a 1.0 and Bob would show as -10. This works out in the end as there are dozens of stats to look at and while Bob may be bad in this one he's good in others. The point of it is that if you're doing better than expected that's great but only marginally important over those who aren't even hitting the expected numbers.

This is just an example so no need to argue about the value of positive sales over negative. I just need to know how to pull this off in an excel formula.
 

Excel Facts

Difference between two dates
Secret function! Use =DATEDIF(A2,B2,"Y")&" years"&=DATEDIF(A2,B2,"YM")&" months"&=DATEDIF(A2,B2,"MD")&" days"
If the score is in B2 and the average is in B7, try: =(B2-B$7)*IF(B2>B$7,0.1,1)
 
Upvote 0
That didn't work as I'd have expected. I'm sure it's something I did.

In the actual spreadsheet the average (in T137) is 52.60.

The first four entries in column T are:

10
43
64
60

Applying this gives me:

0.24
3.24
2.24
-14.60

Clearly something's off there. 10 should give the lowest number (negative) and 64 the highest (postive) but the numbers don't make sense. Why is 60 -14.60 and why is 43 higher than 64?

The formula adjusted for reality says (For T2, T3, T4 and T5):

=(T2-T$137)*IF(T2>T$137,0.1,1)
=(T3-T$137)*IF(T3>T$137,0.1,1)
=(T4-T$137)*IF(T4>T$137,0.1,1)
=(T5-T$137)*IF(T5>T$137,0.1,1)

What did I goof?
 
Last edited:
Upvote 0
Odd, I had a hell of a time getting that to work at first and now it seems to be working just fine. Thanks.
 
Upvote 0

Forum statistics

Threads
1,221,283
Messages
6,159,010
Members
451,531
Latest member
Ian Denney

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