I have the following problem: I need to sum the values in the three columns "Value", and at the same time calculate the discount rate for all items that are marked with the "YES" flag.
The rule for calculating the discount is as follows: For each item marked, separate the word before the "To" tab and search the "Products" table just below the main table. (See attached picture)
Comments:
- The construction "Fruit To ..." is standardized, it will always occur in this way;
- All marked items must have a corresponding line in the "Fruits" table;
- The two tables have different amount of rows;
I already tried all possible combinations of matrix sum, INDEX+MATCH, VLOOKUP, SUMPRODUCT, etc. which I could imagine and could not come up with in a formula that worked.
If someone can see a way that I have not tried yet and that works, thank you in advance for any help!
Angelino