If-Then Statement

A

alanf

Column A = Part Used (not needed for this part)
Column B = Weight of Item
Column C = Company Used (I found this using If-Then, an easy one..)
Column D = Price Paid

Column D is what I am trying to figure out.... what price they pai
according to the weight of the item.
So if the weight was 5 pounds, they used Quick Freight and paid $3.
If the weight was 10-50 pounds, they used Quick Freight and paid $20.
If the weight was 51-70 pounds, they used Gamecock Freight and pai
$40.
If the weight was 71-90 pounds, they used Gamecock Freight and pai
$46.


So for Column D, all the answers will either be $3,$20,$40, or $46 an
thats it.
I have 6,868 parts and weights, so I cant just do it manually.

I tried the Vlookup thing from above, and it said N/A..

Thanks for help. :
 
D

Domenic

alanf said:
Column A = Part Used (not needed for this part)
Column B = Weight of Item
Column C = Company Used (I found this using If-Then, an easy one..)
Column D = Price Paid

Column D is what I am trying to figure out.... what price they pai
according to the weight of the item.
So if the weight was 5 pounds, they used Quick Freight and paid $3.
If the weight was 10-50 pounds, they used Quick Freight and paid $20.
If the weight was 51-70 pounds, they used Gamecock Freight and pai
$40.
If the weight was 71-90 pounds, they used Gamecock Freight and pai
$46.


So for Column D, all the answers will either be $3,$20,$40, or $46 an
thats it.
I have 6,868 parts and weights, so I cant just do it manually.

I tried the Vlookup thing from above, and it said N/A..

Thanks for help. :)

With this layout, change my formula to...

=VLOOKUP(B2,CHOOSE(MATCH(C2,{"Quick Freight","Gamecoc
Freight"},0),QuickFreight,GamecockFreight),2)

Also, don't forget to set up your tables and name them using Insert
Name > Define.

You may want to change the tables to the following...

Quick Freight...

1.....$3.00
10.....$20.00
51.....#N/A

Gamecock Freight...

51.....$40.00
70.....$46.00
91.....#N/A

Does this help
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top