Criteria based rank without skipping numbers

mail4ann

New Member
Joined
Sep 25, 2014
Messages
5
Hi -
I am trying to rank a set of data based on a separate criteria (brand) from the ranking list (assortment size). I need the resulting data to be able to have duplicates, but not skip any numbers as I am going to use the rank results in a vlookup column reference formula.

Each of the below formulas get me about half way there and I haven't been able to figure out how to combine them.

This formula ranks the data based on the brand criteria, but it skips numbers in the resulting rank.
=(COUNTIFS($A$1:$A$7,A1,$B$1:$B$7,"<"&B1)+1)

This formula ranks correctly and does not skip any numbers, but it doesn't allow me to use the brand list criteria.
=SUMPRODUCT((B1 > B$1:B$7)/COUNTIF(B$1:B$7,B$1:B$7))+1

Can anyone help me combine these 2 formulas?

Data Example:

A B C
Brand Assortment Size Rank
Casio 20
Casio 20
Casio 40
Casio 40
Fossil 20
Fossil 20
Fossil 40

Results in C with the top formula
C
1
1
3
3
1
1
3

Desired results in C
C
1
1
2
2
1
1
2

Can anyone help?
Thanks!
 

Excel Facts

What is =ROMAN(40) in Excel?
The Roman numeral for 40 is XL. Bill "MrExcel" Jelen's 40th book was called MrExcel XL.
can you explain further how you are ranking them eg why is casio 20 1 and casio 40 2 and fossil 20 1
 
Upvote 0
The numbers represent assortment sizes of product. Each line represents a store location. i.e. Casio has 2 assortment sizes. the smaller assortment has 20 pieces and the larger has 40. Fossil also has 2 assortment sizes - 20 and 40. Each line represents a store location, but for this ranking which store the plan is in doesn't matter. I am trying to get a rank list of each assortment size by brand, so Casio and Fossil need to be ranked separately.
 
Upvote 0
but what do you meanby ranking - it normally means putting in order - or are you justsorting
 
Upvote 0
Sorry I have not been very clear. I'm pretty good with the basics of excel, but i am struggling with this task. I appreciate your taking the time to review.

I am not sure what to call it. I wont be able to sort the file each time. The formula will need to count/rank correctly even if the file is not in numerical order. The full file has over 1600 lines and 30 plus brands.

I basically need a counter (or rank?) that starts at 1 and increases by 1 every time there is a larger plan size within that brand. Multiple occurrences of the same plan size get the same rank. It seems like a perfect Rankif scenario, if only rankif existed. :)

The condition is that it has to only rank/count within that brand and not skip any numbers.
 
Upvote 0
so, if within your table you had casio 10, casio15, casio 23 and casio 29 each occurring a number of times then casio = 4
similarly if sony = 7 then sony=1 and casio = 2

is that it?
 
Upvote 0
Unfortunately no.

"if within your table you had casio 10, casio15, casio 23 and casio 29 each occurring a number of times then ..."

The results should look like the below. Each occurrence of a different value of casio would have a different number. (Starting at 1 and getting 1 bigger each time there is a bigger plan size). The same value would have the same number, just like a regular rank, but without skipping any values.

example:
casio 10 - 1
casio 10 - 1
casio 15 - 2
casio 23 - 3
casio 23 - 3
casio 29 - 4
Sony 7 - 1
Sony 7 - 1
Sony 14 - 2
Sony 20 - 3
Sony 20 - 3
Sony 23 - 4

Sony would rank in the same fashion, independently from the Casio values.
 
Upvote 0
casio 10 - 1
casio 10 - 1the simple pivot table
casio 15 - 2finds all the unique
casio 23 - 3calculatedconcatenateditems in the list
casio 23 - 3itemscode
casio 29 - 4casio 101casio 10 - 1
Sony 7 - 1casio 101casio 10 - 1Count of items
Sony 7 - 1casio 152casio 15 - 2itemsTotal
Sony 14 - 2casio 233casio 23 - 3casio 102
Sony 20 - 3casio 233casio 23 - 3casio 151
Sony 20 - 3casio 294casio 29 - 4casio 232
Sony 23 - 4sony 74sony 7 - 4casio 291
sony 74sony 7 - 4sony 141
sony 141sony 14 - 1sony 202
sony 202sony 20 - 2sony 231
sony 202sony 20 - 2sony 72
sony 233sony 23 - 3Grand Total12
if it is vital thatsony 7 is 1 I am stumped
alphabetagammaepsilonomega
casio 106casio101
casio 156casio152
casio 236casio233
alpha column is generatedcasio 296casio294
automatically fromsony 145sony141
the pivot tablesony 205sony202
sony 235sony233
sony 75sony74
beta is the position of
the blank character
gamma is the brand
epsilon is the model
number
omega is the number required

<colgroup><col><col span="5"><col><col><col><col><col><col><col span="2"></colgroup><tbody>
</tbody>
 
Upvote 0
That doesn't quite get where i need, but it did give me some more ideas to test with. - maybe a concatenate rank?? i'll see what i can come up with.

Thank you so much for taking the time to try to work on this.

I will work on it some more and hopefully get there.

Thanks again.
 
Upvote 0

Forum statistics

Threads
1,215,510
Messages
6,125,241
Members
449,217
Latest member
Trystel

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