Alternate to Nested IF Statement?

ryode63

New Member
Joined
Nov 3, 2014
Messages
17
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
 

Excel Facts

Did you know Excel offers Filter by Selection?
Add the AutoFilter icon to the Quick Access Toolbar. Select a cell containing Apple, click AutoFilter, and you will get all rows with Apple
Not entirely clear about your situation but try this:

=vlookup(D2,'Data Sheet'!D2:E12,2,false)*G2

This will match D2 with D2 in datasheet and return column E from Data Sheet and multiply it with G2
 
Upvote 0

Forum statistics

Threads
1,214,929
Messages
6,122,315
Members
449,081
Latest member
tanurai

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top