Vlookup ---> then QTY Extact match or Greater Qty

MUKESHY12390

Well-known Member
Joined
Sep 18, 2012
Messages
901
Office Version
  1. 2013
  2. 2011
  3. 2010
  4. 2007
Platform
  1. Windows
Hi All

I'm trying to build formula to lookup one column (Product) (has Duplicate value in Table Array) and if "Product" matches with lookup table ("A:B") then ---> it should look for Exact Qty or Greater Qty (column B) but the first preference is "Exact match"

for reference I have uploaded file to below link.


https://www.dropbox.com/s/3jtyr4mtg0al43q/MrExcel_Question.xlsx?dl=0



Thanks,
Mukesh
 

Excel Facts

Show numbers in thousands?
Use a custom number format of #,##0,K. Each comma after the final 0 will divide the displayed number by another thousand
Try


[Table="class: grid"][tr][td="bgcolor: #DCE6F1"][/td][td="bgcolor: #DCE6F1"]
A
[/td][td="bgcolor: #DCE6F1"]
B
[/td][td="bgcolor: #DCE6F1"]
C
[/td][td="bgcolor: #DCE6F1"]
D
[/td][td="bgcolor: #DCE6F1"]
E
[/td][td="bgcolor: #DCE6F1"]
F
[/td][/tr]
[tr][td="bgcolor: #DCE6F1"]
1
[/td][td]
Product Name​
[/td][td]
Qty​
[/td][td][/td][td]
Product Name​
[/td][td]
QTY​
[/td][td]
Expected​
[/td][/tr]

[tr][td="bgcolor: #DCE6F1"]
2
[/td][td]
Alconol 500mg (4's)​
[/td][td]
50​
[/td][td][/td][td]
Alconol 500mg (4's)​
[/td][td]
40​
[/td][td]
50​
[/td][/tr]

[tr][td="bgcolor: #DCE6F1"]
3
[/td][td]
Alconol 500mg (4's)​
[/td][td]
30​
[/td][td][/td][td][/td][td][/td][td][/td][/tr]

[tr][td="bgcolor: #DCE6F1"]
4
[/td][td]
Accufine 20mg (10's)​
[/td][td]
40​
[/td][td][/td][td][/td][td][/td][td][/td][/tr]

[tr][td="bgcolor: #DCE6F1"]
5
[/td][td]
Accufine 30mg (10's)​
[/td][td]
80​
[/td][td][/td][td][/td][td][/td][td][/td][/tr]

[tr][td="bgcolor: #DCE6F1"]
6
[/td][td]
Accufine 30mg (10's)​
[/td][td]
90​
[/td][td][/td][td][/td][td][/td][td][/td][/tr]

[tr][td="bgcolor: #DCE6F1"]
7
[/td][td]
Accufine 5mg (10's)​
[/td][td]
40​
[/td][td][/td][td][/td][td][/td][td][/td][/tr]

[tr][td="bgcolor: #DCE6F1"]
8
[/td][td]
Acenext 100mg (10's​
[/td][td]
20​
[/td][td][/td][td][/td][td][/td][td][/td][/tr]
[/table]


Formula in F2
=AGGREGATE(15,6,B$2:B$8/((A$2:A$8=D2)*(B$2:B$8>=E2)),1)

M.
 
Upvote 0
Thanks for the quick reply. I will check and confirm.
 
Last edited:
Upvote 0
thanks , I amazed it works exactly I wanted.

Is is possible to you if you could explain the formula specially this part "B$2:B$8/((A$2:A$8=D2)*(B$2:B$8>=E2))".

that would very helpful.

Thank you so much!!

 
Upvote 0
You are welcome. Glad to help.

To understand what the formula does, step by step, try
Formulas > Evaluate formula

M.
 
Upvote 0
Understood now....I'm so intelligent :).This is the first time I used AGGREGATE function.

Thanks Again Branco.
 
Last edited:
Upvote 0

Forum statistics

Threads
1,224,819
Messages
6,181,153
Members
453,021
Latest member
Justyna P

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