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

Excel Can Read to You
Customize Quick Access Toolbar. From All Commands, add Speak Cells or Speak Cells on Enter to QAT. Select cells. Press Speak Cells.
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,223,891
Messages
6,175,229
Members
452,621
Latest member
Laura_PinksBTHFT

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