If anyone is willing to help, I need a formula that is going to find "Product ID" (in row 2) considering user input product prices.
There are more instructions inside the sheet, right after the table. In F8:F10 I've put the results one'd expect to get using the formula.
p.s.: consider this table is generated by our internal system so unfortunately changing the way data is displayed should only be considered as a last resort.
Thank you!
There are more instructions inside the sheet, right after the table. In F8:F10 I've put the results one'd expect to get using the formula.
Book1 | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
A | B | C | D | E | F | G | H | I | J | K | L | M | |||
1 | Product id | ||||||||||||||
2 | id1 | id2 | id3 | id4 | id5 | id6 | id7 | id8 | id9 | id10 | |||||
3 | Retail price | 7.50 | 12.60 | 24.40 | 9.20 | 9.20 | 16.01 | 5.05 | 3.07 | 8.68 | 7.50 | ||||
4 | Production cost | 5.00 | 10.00 | 20.00 | 6.00 | 8.00 | 14.00 | 5.00 | 3.00 | 7.00 | 6.00 | ||||
5 | |||||||||||||||
6 | |||||||||||||||
7 | Price type | Price | Procuct id | ||||||||||||
8 | E.g 1 | Production cost | 8 | ?? | <- expected result | id5 | |||||||||
9 | E.g 2 | Retail price | 7.5 | ?? | <- expected result | id1, id10 | |||||||||
10 | E.g 3 | Retail price | 24.5 | ?? | <- expected result | No such product | |||||||||
11 | |||||||||||||||
12 | Price column (C8:C10) is user input | ||||||||||||||
13 | Price type (B8:E10) is selected by user using drop-down | ||||||||||||||
14 | Formula (D8:D10) must search for user price input (C8:C10) somewhere in B3:K4 then (if there is any) display matching id within row 2 | ||||||||||||||
15 | The tricky part is that If more than one result is valid (as shown in E.g 2 - G8), all results must be displayed one after the other [matching id A, matching id B… matching id N] | ||||||||||||||
16 | Within my real data, most (but not all) "prices and costs" are unique inside their category. Hence, formula should only account for exact matches. | ||||||||||||||
Sheet1 |
Cells with Data Validation | ||
---|---|---|
Cell | Allow | Criteria |
B8:B10 | List | =$A$3:$A$4 |
p.s.: consider this table is generated by our internal system so unfortunately changing the way data is displayed should only be considered as a last resort.
Thank you!