The blue columns is the data given and the red columns is what is being calculated. Then the table to the right is what I am referencing. So, F2 will be calculated by the following steps:
- Look at the Machinery column (D), if the cell contains LF, select column K, otherwise select column L
- Look at the Grade column (E), if the cell contains RG, select rows 4:8, otherwise select rows 9:12.
- Look at the Species column (A), if the cell contains MS, select rows 5 and 10, otherwise.......
- Where every the most selected cell is in columns K and L, copy into column F.
- Multiply column F by column C.
I don't want to make another column for my final result. I did in the picture to show the two steps separately. So column F should be the final answer (F2 = 107.33). The reference table can be formatted differently as well.
At first, I tried using nested-if statements, but realized that I would have like 20+ if statements for all the different outcomes. I think I would want to use the SEARCH function to find weather of not the cell contains a specific piece of information. Then I would probably use some sort of combination of match, if, v-lookup, index, search, but I am not sure how to condense these.
Any suggestion?
Aucun commentaire:
Enregistrer un commentaire