#1   Report Post  
Posted to microsoft.public.excel.misc
Kim Kim is offline
external usenet poster
 
Posts: 284
Default Price Ranking

Hi there,

Can someone help me with a query. I need to give a ranking based on price in
certain city.

Exp:
A B C D
1 Item 1 LON 100.00
2 Item 2 MAD 80.00
3 Item 3 BCN 80.00
4 Item 4 LON 80.00
5 Item 5 LON 120.00
6 Item 6 BCN 85.00

Basically in column D, it should give me the ranking based on the cheaper
rate based on the same criteria on column B. The answer for above should be

2
1 (cheapest in MAD)
1 (cheapest in BCN)
1 (cheapest in LON)
3
2

Looking forward for your reply.

Thanks.
Kim

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,058
Default Price Ranking

=MIN(IF(B1:B6="MAD",C1:C6,""))
=MIN(IF(B1:B6="BCN",C1:C6,""))
=MIN(IF(B1:B6="LON",C1:C6,""))


These are array formulas that must be entered with CNTRL-SHFT-ENTER rathr
than just the ENTER key.
--
Gary''s Student - gsnu200851


"Kim" wrote:

Hi there,

Can someone help me with a query. I need to give a ranking based on price in
certain city.

Exp:
A B C D
1 Item 1 LON 100.00
2 Item 2 MAD 80.00
3 Item 3 BCN 80.00
4 Item 4 LON 80.00
5 Item 5 LON 120.00
6 Item 6 BCN 85.00

Basically in column D, it should give me the ranking based on the cheaper
rate based on the same criteria on column B. The answer for above should be

2
1 (cheapest in MAD)
1 (cheapest in BCN)
1 (cheapest in LON)
3
2

Looking forward for your reply.

Thanks.
Kim

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 5,441
Default Price Ranking

Kim,

For your example set, enter this in D1 and copy down:

=SUMPRODUCT(($B$1:$B$6=B1)*($C$1:$C$6<C1))+1

To get fancy, use

=IF(SUMPRODUCT(($B$1:$B$6=B1)*($C$1:$C$6<C1))+1=1, "1 (cheapest in " & B1 &
")",SUMPRODUCT(($B$1:$B$6=B1)*($C$1:$C$6<C1))+ 1)

HTH,
Bernie
MS Excel MVP


"Kim" wrote in message
...
Hi there,

Can someone help me with a query. I need to give a ranking based on price in
certain city.

Exp:
A B C D
1 Item 1 LON 100.00
2 Item 2 MAD 80.00
3 Item 3 BCN 80.00
4 Item 4 LON 80.00
5 Item 5 LON 120.00
6 Item 6 BCN 85.00

Basically in column D, it should give me the ranking based on the cheaper
rate based on the same criteria on column B. The answer for above should be

2
1 (cheapest in MAD)
1 (cheapest in BCN)
1 (cheapest in LON)
3
2

Looking forward for your reply.

Thanks.
Kim



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
Help: Need Excel formula to return correct price from price history table Ian_W-at-GMail Excel Discussion (Misc queries) 5 March 21st 07 06:45 PM
Price List overall price increase Sean Lambertz Excel Discussion (Misc queries) 4 May 22nd 06 01:39 PM
base price list compute on to another price list? on excel work sh excel spread sheet Excel Discussion (Misc queries) 0 March 29th 06 06:20 PM
calculate/convert volume price to monthly average price Bultgren Excel Worksheet Functions 2 February 14th 06 09:36 AM
create a formula for price * discount* tax =final price anton Excel Discussion (Misc queries) 6 October 12th 05 07:51 PM


All times are GMT +1. The time now is 04:11 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"