Combining an IF statement & a VLOOKUP

j03case

New Member
Joined
Nov 24, 2014
Messages
11
I need to combine an If Statement with a VLOOKUP.

I have a cell (P3), where I'd like to populate the sales price of an item. I have a Vlookup in that cell as follows:
VLOOKUP(B3,Sheet3!A$2:C$13,3)

But, one of the items in the Vlookup has one price if if it <=107,999 pcs, and another price if it is >=108,000 pcs. So, I need an IF Statement that would look something like this:
=IF(B3<=107999,0.0242,0.0217).

How can I combine these two statements?
 

Excel Facts

Add Bullets to Range
Select range. Press Ctrl+1. On Number tab, choose Custom. Type Alt+7 then space then @ sign (using 7 on numeric keypad)
I need to combine an If Statement with a VLOOKUP.

I have a cell (P3), where I'd like to populate the sales price of an item. I have a Vlookup in that cell as follows:
VLOOKUP(B3,Sheet3!A$2:C$13,3)

But, one of the items in the Vlookup has one price if if it <=107,999 pcs, and another price if it is >=108,000 pcs. So, I need an IF Statement that would look something like this:
=IF(B3<=107999,0.0242,0.0217).

How can I combine these two statements?

I am not sure to understand your question but if want the vlookup to show 0.0242 if <=107999 then
Code:
[LEFT][COLOR=#333333][FONT=Verdana]=IF([COLOR=#333333][FONT=Verdana]VLOOKUP(B3,Sheet3!A$2:C$13,3)[/FONT][/COLOR]<=107999,0.0242,0.0217).[/FONT][/COLOR][/LEFT]
.

I rather use index and match functions (quicker) than vlookup those last years but I think vlookup output is text. In that case, simply add value function to get a value out of it
Code:
[LEFT][COLOR=#333333][FONT=Verdana]=IF(Value([/FONT][/COLOR][COLOR=#333333][FONT=Verdana]VLOOKUP(B3,Sheet3!A$2:C$13,3))[/FONT][/COLOR][COLOR=#333333][FONT=Verdana]<=107999,0.0242,0.0217)[/FONT][/COLOR][/LEFT]
 
Last edited:
Upvote 0
Another solution is to use sumifs instead...just need to make sure the combination of conditions is one line...maybe adding a helping column, so something like that

=sumifs(C2:C13,A2:A13,B3,D2:D13,true)
 
Upvote 0

Forum statistics

Threads
1,214,395
Messages
6,119,265
Members
448,881
Latest member
Faxgirl

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.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

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

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

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
Back
Top