smide
Board Regular
- Joined
- Dec 20, 2015
- Messages
- 162
- Office Version
- 2016
- Platform
- Windows
Hello.
In column A (A2:A600) I have a list of cities and towns, in column B (B2:B600) product names and in column C (C2:C600) the price of each product.
The same city can appear more than once in column A and the same product can appear more than once in column B.
In first row from column D (cells D1, E1, F1...) I have all possible cities.
I need a top two product names from each city based on their price and result(s) should be in rows 2 and 3 below the name of corresponding city.
example.
explanation. Two most expensive products in Munchen are orange 35 (cell C7) and cabbage 12 (cell C2) so results are in cells D2 and D3 (below München in D1). The same for other cities.
* I'm using excel 2007.
In column A (A2:A600) I have a list of cities and towns, in column B (B2:B600) product names and in column C (C2:C600) the price of each product.
The same city can appear more than once in column A and the same product can appear more than once in column B.
In first row from column D (cells D1, E1, F1...) I have all possible cities.
I need a top two product names from each city based on their price and result(s) should be in rows 2 and 3 below the name of corresponding city.
example.
A | B | C | D | E | F | |
1 | City | Product | Price | Munchen | Brisbane | Oslo |
2 | Munchen | cabbage | 12 | orange | apple | grapes |
3 | Brisbane | orange | 30 | cabbage | orange | fish |
4 | Oslo | fish | 44 | |||
5 | Brisbane | tomato | 19 | |||
6 | Brisbane | apple | 37 | |||
7 | Munchen | orange | 35 | |||
8 | Oslo | plum | 28 | |||
9 | Munchen | potato | 6 | |||
10 | Oslo | grapes | 52 |
explanation. Two most expensive products in Munchen are orange 35 (cell C7) and cabbage 12 (cell C2) so results are in cells D2 and D3 (below München in D1). The same for other cities.
* I'm using excel 2007.