Ranking based on 3 criteria

Jillybean9621

New Member
Joined
Aug 31, 2017
Messages
8
Hi everyone. I've searched through the forums and haven't found exactly what I'm looking for just yet so I thought I'd ask.

How could I rank projects based on items, age, city (city is given a number) for example
A B C
5 73 Portland 13
2 107 Salem 33
2 153 tillimock 4

The lower the number on the city column they should have a higher importance. The higher age and higher item counts have the higher importance as well.

Does this make sense?
In this example tillimock woukd be #1 , Portland 2.

There would be a potential of 200 records that would need to be ranked.
 
Here is an actual based on data pulled this morning.

Co Age City Rk FOCUS
3 134.16 10 39
1 132.48 10 44
1 132.30 10 45
4 129.60 10 38
5 128.34 10 37
1 672.30 4 5
1 437.57 4 9
7 349.42 4 1
1 314.20 4 10
2 309.34 4 3
1 304.27 4 11
1 232.16 4 15
1 13.51 26 148
1 13.33 26 151
1 13.51 26 147
3 13.23 26 144
1 10.59 26 154


The focus was created using the formula from peter_SS or Marcelo =COUNTIF(D:D,"<"&D2)+COUNTIFS(D:D,D2,A:A,">"&A2)+COUNTIFS(D:D,D2,A:A,A2,B:B,">"&B2)+1


this formula =SUMPRODUCT(--((-$D$2:$D$7*10^6+A$2:A$7*1000+B$2:B$7)>(-D2*10^6+A2*1000+B2)))+1 gives me different results some pretty large differences in some cases.
Ct Age City Rank Focus
3 134.16 10 4
1 132.48 10 60
1 132.30 10 61
4 129.60 10 3
5 128.34 10 2
1 672.30 4 20
1 437.57 4 25
7 349.42 4 1
1 314.20 4 28
2 309.34 4 11
1 304.27 4 30
1 232.16 4 34
1 13.51 26 149
1 13.33 26 152
1 13.51 26 148
3 13.23 26 9
1 10.59 26 155
1 112.35 12 67
2 104.48 12 13


you all are extremely awesome
 
Upvote 0

Excel Facts

What is the last column in Excel?
Excel columns run from A to Z, AA to AZ, AAA to XFD. The last column is XFD.
The two formulas worked perfectly. All you have to do is to adjust the ranges accordingly your data (columns and rows).


A
B
C
D
E
1
Co​
Age​
City Rk​
Marcelo​
Peter​
2
3​
134,16​
10​
10​
10​
3
1​
132,48​
10​
11​
11​
4
1​
132,3​
10​
12​
12​
5
4​
129,6​
10​
9​
9​
6
5​
128,34​
10​
8​
8​
7
1​
672,3​
4​
3​
3​
8
1​
437,57​
4​
4​
4​
9
7​
349,42​
4​
1​
1​
10
1​
314,2​
4​
5​
5​
11
2​
309,34​
4​
2​
2​
12
1​
304,27​
4​
6​
6​
13
1​
232,16​
4​
7​
7​
14
1​
13,51​
26​
14​
14​
15
1​
13,33​
26​
16​
16​
16
1​
13,51​
26​
14​
14​
17
3​
13,23​
26​
13​
13​
18
1​
10,59​
26​
17​
17​

D2 copied down
=COUNTIF(C:C,"<"&C2)+COUNTIFS(C:C,C2,A:A,">"&A2)+COUNTIFS(C:C,C2,A:A,A2,B:B,">"&B2)+1

E2 copied down
=SUMPRODUCT(--((-$C2:$C$18*10^6+A$2:A$18*1000+B$2:B$18)>(-C2*10^6+A2*1000+B2)))+1

M.
 
Upvote 0
D2 copied down
=COUNTIF(C:C,"<"&C2)+COUNTIFS(C:C,C2,A:A,">"&A2)+COUNTIFS(C:C,C2,A:A,A2,B:B,">"&B2)+1

E2 copied down
=SUMPRODUCT(--((-$C2:$C$18*10^6+A$2:A$18*1000+B$2:B$18)>(-C2*10^6+A2*1000+B2)))+1
Some further comments:

- I agree with Marcelo that both our formulas produce the same result on the new sample data if the ranges are adjusted correctly, but the adjustment to my formula should actually be
=SUMPRODUCT(--((-$C$2:$C$18*10^6+A$2:A$18*1000+B$2:B$18)>(-C2*10^6+A2*1000+B2)))+1

- Both our formulas will produce incorrect (& different) results if there are any rows among the data that are empty. If that is a possibility post back with details.

- If you choose to use Marcelo's formula structure, I would still restrict the ranges within the columns or the sheet could become quite slow if you actually have quite a few rows of data. For example, I copied the data and formulas down to row 2000 (and adjusted the ranges in my formulas). The column of my formulas took less than one second to calculate whereas Marcelo's column took more than 20 seconds. If his formula was range restricted then it calculated very quickly too. For example
=COUNTIF(C$2:C$2000,"<"&C2)+COUNTIFS(C$2:C$2000,C2,A$2:A$2000,">"&A2)+COUNTIFS(C$2:C$2000,C2,A$2:A$2000,A2,B$2:B$2000,">"&B2)+1
 
Upvote 0
I have noticed some controversy about how functions with IF, COUNTIFs, SUMIFs, AVERAGEIFs etc handle references to entire columns. I've read messages from some experts saying that such functions are smart enough to only evaluate rows that contain data. On the other hand, others claim that such references impair performance.

The test that Peter performed and shared with us reinforces this second position.

Thank you, Peter, for bringing some light into this discussion.

M.
 
Upvote 0
Hi Marcelo

I think some of those claims of 'smart' functions are correct, but I can never remember which functions or what usage circumstance invokes that 'smartness'. :eek:
So I mostly take the conservative approach and try to restrict the rows anyway - I can't see a disadvantage in doing that. :)
 
Upvote 0

Forum statistics

Threads
1,216,075
Messages
6,128,665
Members
449,462
Latest member
Chislobog

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