Hello!
I have a spreadsheet that I am working on and need nested if statements. Searching around I find that a lot of excel pro's say that too many if statements is inefficient or can work incorrectly. I'd like an alternative.
In my spreadsheet I have a column (G) of units and need to calculate the dollar amount in (H). I need excel to look at the code in column (D), compare it to a table I have in "Data Sheet" page and calculate. The table has eleven codes starting in (D2) of "data sheet" and the values start in (E2) of data sheet. "data sheet" has a table D1:E12; d has the code and e has the dollar value of that code.
So simply look at the code in G, find that code in another sheet (column D of "data sheet") and multiply the value to the right of the code by the number of units.
Or,
1. Look at D2.
2. Find that code in "Data Sheet"
3. Take the value to the right of the code in data sheet and multiply it by value in G2.
I think I can do this with a nested if function but don't want to begin if there is a better way. Any suggestions or advice would be great.
Ryan
I have a spreadsheet that I am working on and need nested if statements. Searching around I find that a lot of excel pro's say that too many if statements is inefficient or can work incorrectly. I'd like an alternative.
In my spreadsheet I have a column (G) of units and need to calculate the dollar amount in (H). I need excel to look at the code in column (D), compare it to a table I have in "Data Sheet" page and calculate. The table has eleven codes starting in (D2) of "data sheet" and the values start in (E2) of data sheet. "data sheet" has a table D1:E12; d has the code and e has the dollar value of that code.
So simply look at the code in G, find that code in another sheet (column D of "data sheet") and multiply the value to the right of the code by the number of units.
Or,
1. Look at D2.
2. Find that code in "Data Sheet"
3. Take the value to the right of the code in data sheet and multiply it by value in G2.
I think I can do this with a nested if function but don't want to begin if there is a better way. Any suggestions or advice would be great.
Ryan