• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Help in an IF and VLOOKUP nested function

I need cell H39 to have a formula that calculates shipping costs. If the subtotal (cell H37) is greater than 200, than H39 should display 0. If H37 is less that 200, it needs to display the shipping cost based on the table named shipping_cost. I entered the formula =IF(H37>200,0,VLOOKUP(H37,shipping_cost,2,FALSE)) and I'm getting a #NA error. What did I leave out?
 
Dragonbonetattoo


Firstly, Welcome to the Chandoo.org Forums


Is the value in H37 in the first Column of the shipping_cost Range ?

Make sure that the Shipping_Cost range has a value less than the lowest value expected in H37
 
The value in H37 is 32.95. The shipping_cost table looks like this:

0 6.00

55 9.50

100 12.50

150 16.00

The order total is on the left, and the cost is on the right. Since the order is under 55, the shipping costs in H39 should read 9.50.


Thanks!
 
Hi ,


Use the following formula :


=IF(H37>200,0,LOOKUP(H37,shipping_cost))


If you want to use VLOOKUP , then you need to change it to :


=IF(H37>200,0,VLOOKUP(H37,shipping_cost,2,TRUE))


Narayan
 
Back
Top