Good day,
Please, I appreciate the help in advance I'll try to explain with an example what I really need; a formula to fill in the locality I should buy in column B.
First all the statuses need to be “Available” line 1
1- As I'm located in Brazil, this would be the location priority. Example in line 3; I need 2 ; “needed :2” and in Brazil I have 297 units available.
2- When not available in Brazil, select the nearest countries, for example in line 5, Chile or Colombia. Note that China has been left out.
To decide between Chile and Colombia, check which country has more different ID numbers available; for example, between rows 5 and 8, Chile has 4, and Colombia 2. Therefore, it is more interesting to buy from Chile.
3- If the “Available” quantity is below the “Needed” quantity, select the one with the quantity or more; example line 9, Australia.
Please, I appreciate the help in advance I'll try to explain with an example what I really need; a formula to fill in the locality I should buy in column B.
First all the statuses need to be “Available” line 1
1- As I'm located in Brazil, this would be the location priority. Example in line 3; I need 2 ; “needed :2” and in Brazil I have 297 units available.
2- When not available in Brazil, select the nearest countries, for example in line 5, Chile or Colombia. Note that China has been left out.
To decide between Chile and Colombia, check which country has more different ID numbers available; for example, between rows 5 and 8, Chile has 4, and Colombia 2. Therefore, it is more interesting to buy from Chile.
3- If the “Available” quantity is below the “Needed” quantity, select the one with the quantity or more; example line 9, Australia.
Location to buy test.xlsx | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
A | B | C | D | E | F | G | H | I | J | K | L | M | |||
1 | Available | Available | Available | Available | Available | Available | Available | Not available | Available | Available | |||||
2 | Id Number | Location | Needed | Argentina | Chile | Colombia | Uruguai | Portugal | France | Japan | China | Australia | Brazil | ||
3 | 5623 | Brazil | 2 | 0 | 1 | 50 | 0 | 0 | 0 | 0 | 0 | 0 | 297 | ||
4 | 2458 | Brazil | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 7 | ||
5 | 213335 | Chile | 2 | 0 | 7 | 2 | 0 | 0 | 0 | 0 | 254 | 0 | 0 | ||
6 | 598456 | Chile | 3 | 0 | 3 | 0 | 0 | 0 | 2 | 0 | 0 | 0 | 0 | ||
7 | 369546 | Chile | 2 | 0 | 5 | 10 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | ||
8 | 365982 | Chile | 1 | 0 | 2 | 0 | 0 | 0 | 0 | 0 | 0 | 17 | 0 | ||
9 | 123458 | Australia | 3 | 0 | 1 | 0 | 0 | 1 | 2 | 0 | 4 | 0 | |||
10 | 32156 | Brazil | 3 | 10 | 0 | 0 | 3 | 0 | 0 | 0 | 0 | 0 | 8 | ||
11 | 6712569 | Brazil | 1 | 0 | 0 | 9 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | ||
12 | 364781 | Uruguai | 2 | 0 | 0 | 0 | 2 | 0 | 0 | 0 | 0 | 1 | 1 | ||
Sheet1 |
Cells with Conditional Formatting | ||||
---|---|---|---|---|
Cell | Condition | Cell Format | Stop If True | |
A1:A12 | Cell Value | duplicates | text | NO |
D3:M12 | Cell Value | >=$C3 | text | NO |
D3:M12 | Cell Value | between $C3 and 0,1 | text | NO |