if statement

A

AmyLRuck

I am trying to insert a shipping and handling rate based on the cost of the
purchase. How can I write an if statement based on different price ranges?
 
S

Sheeloo

You can setup your ranges in another sheet (Col A & B) like the following;
0 Value for 0-9
10 Value for 10-99
100 Value for 100-999
1000 Value for >999



If your price is in A1 then in B1 enter
=VLOOKUP(A1,Sheet2!A:B,2,TRUE)
 
A

AmyLRuck

This will not work because I have an exact value and I need to look for it in
a range...a vlookup cannot figure that out.
 
A

AmyLRuck

I figured out how to do this with an If statement. Thank you for your
assistance.
 
S

Sheeloo

VLOOKUP with TRUE can lookup the value in a range
In the example I have given any value between 10 and 99 will return 'value
between 10-99'

If you have exact result for each value then use VLOOKUP with FALSE.

Glad you solved the prob lem on your own.
 
Top