Hi everyone,
Quite difficult to explain with my english skills!
In G4 I need a vlookup formula that:
<tbody>
</tbody>
Quite difficult to explain with my english skills!
In G4 I need a vlookup formula that:
- vlookup column G (Margin)
- if cells in column E are matching
- if the date is the most recent vs column B
- vlookup column G (Margin)
- if cells in column E are matching
- if cells in column D are matching
- if the date is the most recent vs column B
I have already added on range G4:H6 values I would like to have, as it is the easiest way to let you understand. Thank you in advance
ID | DATE | YEAR | MONTH | NAME | MARGIN | PREVIOUS MARGIN | SAME MONTH MARGIN |
100 | 2014-12-11 | 2014 | 12 | UK | 1000 | ||
101 | 2014-12-11 | 2014 | 12 | USA | 2000 | ||
102 | 2014-12-11 | 2014 | 12 | RUSSIA | 3000 | ||
10023 | 2015-05-03 | 2015 | 5 | USA | 1500 | 2000 | 7500 |
19343 | 2015-05-03 | 2015 | 5 | RUSSIA | 2500 | 3000 | 1500 |
12123 | 2015-05-03 | 2015 | 5 | UK | 2000 | 1000 | 3500 |
89 | 2014-05-15 | 2014 | 5 | UK | 3500 | ||
1898 | 2014-05-15 | 2014 | 5 | RUSSIA | 1500 | ||
7856 | 2014-05-15 | 2014 | 5 | USA | 7500 |
<tbody>
</tbody>