#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 9
Default using RANK function

I have a list like
product customer revenue revenue
year 1 year 2 .....
A cust1 100 110
A cust2 120 65
A cust 3 139 88
...
B cust 1 333 500
B cust 2 122 220
B cust 3 65 287
...
for several years, products and customers
What I want to do is get each customer's rank within each product for each
year.
I will be using this each month and the number of customers within each
product class will change from month to month. So, I cannot use somthing like
RANK(A23,A15:A90)
because the starting and ending rows for a product will change each month.
How can I set up the RANK function to pick up the staring and ending points
of each product?

Thanks
Sanford
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,344
Default using RANK function

Hi Sanford,

Here is one solution:

Suppose columns G, H, and I are available. Suppose your data starts on row
2 with titles on row 1. With your categories in column A and the values you
want to rank in column B:

In G2 enter the formula: =IF(A2=A1,G1,ROW(A2))
In H2 enter the formula: =G2+COUNTIF(A$2:A$100,A2)-1
In I2 enter the formula: =RANK(B2,INDIRECT("B"&G2&":B"&H2))

In this example I have assumed the data could go down to row 100, but you
can adjust that reference.

--
Cheers,
Shane Devenshire


"Sanford Lefkowitz" wrote:

I have a list like
product customer revenue revenue
year 1 year 2 .....
A cust1 100 110
A cust2 120 65
A cust 3 139 88
...
B cust 1 333 500
B cust 2 122 220
B cust 3 65 287
...
for several years, products and customers
What I want to do is get each customer's rank within each product for each
year.
I will be using this each month and the number of customers within each
product class will change from month to month. So, I cannot use somthing like
RANK(A23,A15:A90)
because the starting and ending rows for a product will change each month.
How can I set up the RANK function to pick up the staring and ending points
of each product?

Thanks
Sanford

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Rank function Marc Shaw Excel Worksheet Functions 5 September 20th 07 10:30 PM
Rank function yshridhar Excel Worksheet Functions 9 August 27th 07 09:10 AM
Rank Function azlan Setting up and Configuration of Excel 1 July 10th 07 09:14 AM
Rank Function Andrew C Excel Worksheet Functions 1 August 15th 06 07:09 AM
Rank Function Jeff Excel Discussion (Misc queries) 1 November 8th 05 08:26 PM


All times are GMT +1. The time now is 08:29 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"