# Lookup in Table then....

#### kaustin

##### New Member
I have a large spreadsheet with lots of daily sales volumes and need to look up the sales number in a table to determine the cost varaible then multiply the total sales by cost. Can anyone help out. I was only able to come up with a simple IF statement to the first range. I need it to look through the min/max and if it is between those variables multiply it by cost.
My formula to calculate the \$133,000.00 is:

IF(AND(B10>A2,B10<B2),(B10*C2))

Thanks for helping

Min Max Cost
0 500,000 \$0.38
500,001 1,000,000 \$0.30
1,000,001 2,000,000 \$0.29
2,000,001 3,000,000 \$0.28
3,000,001 4,000,000 \$0.27
4,000,001 5,000,000 \$0.26
5,000,001 100,000,000 \$0.25

Total Sales 350,000 \$133,000.00
1,00,002
2,000,004
3,000,003
4,000,005
8,000,000
Code:

### Excel Facts

Excel Joke
Why can't spreadsheets drive cars? They crash too often!
For some reason I get a #N/A.

Sorry, that last version didn't post properly
Book1
ABCDEF
1SalesLookup Table
2350000133,000.0000.38
3500000190,000.005000010.3
4500001150,000.3010000010.29
5-20000010.28
6-30000010.27
7-40000010.26
8-50000010.25
Sheet2

I have set up an example just like you have it with the exact same formula and continue to get #N/A. Any idea why, would you think there is something I might have turned off?

If you get an N/A, it means that the vlaue you are looking up isn't found in the look up table.

Could it be formatted as text?

I deleted my sheet and it works fine now. Thanks for helping.

Replies
5
Views
160
Replies
9
Views
562
Replies
1
Views
299
Replies
2
Views
399

1,217,347
Messages
6,136,046
Members
449,984
Latest member
Ffprojectjkt

### 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.

### Which adblocker are you using?

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

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