ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   if statement (https://www.excelbanter.com/excel-discussion-misc-queries/205141-if-statement.html)

AmyLRuck

if statement
 
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?

Sheeloo[_2_]

if statement
 
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)

"AmyLRuck" wrote:

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?


AmyLRuck

if statement
 
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.



"Sheeloo" wrote:

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)

"AmyLRuck" wrote:

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?


AmyLRuck

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

"Sheeloo" wrote:

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)

"AmyLRuck" wrote:

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?


Sheeloo[_2_]

if statement
 
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.

"AmyLRuck" wrote:

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.



"Sheeloo" wrote:

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)

"AmyLRuck" wrote:

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?



All times are GMT +1. The time now is 05:55 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com