vlookup exact AND partial match

DrewP

New Member
Joined
Jan 9, 2024
Messages
2
Office Version
  1. 365
Platform
  1. Windows
I cannot seem to write a vlookup formula that provides what I need. I am looking to search Products in A8-11 and return price in B8-11. I need to match A2 AND B2 in this search. As you can see, partial results should show for A8 and return the corresponding price in cell B8. Can you help?

PH_Sales_Pivot_View (32).xls
ABC
1Productsubscriptionprice?
210 Gym2 years
3blockbuster9 months
4Olive Gardenn/a
5
6
7ProductPrice
82 year 10 gym membership500
91 year blockbuster card50
103 year 10 gym membership100
11Olive Garden gift card10
Sheet2
 

Excel Facts

Do you hate GETPIVOTDATA?
Prevent GETPIVOTDATA. Select inside a PivotTable. In the Analyze tab of the ribbon, open the dropown next to Options and turn it off
try
=VLOOKUP("*"&A2&"*",$A$8:$B$11,2,FALSE)

BUT it will find the first one in the list - if you have this more then once

for example anything with 10 gym in the first wil be found

9 months does no match anything nor does N/A
so how will the A and B - be combined to match ????
can you give more examples and expected results

Book3
ABC
1Productsubscriptionprice?
210 Gym2 years500
3blockbuster9 months50
4Olive Gardenn/a10
5
6
7ProductPrice
82 year 10 gym membership500
91 year blockbuster card50
103 year 10 gym membership100
11Olive Garden gift card10
Sheet1
Cell Formulas
RangeFormula
C2:C4C2=VLOOKUP("*"&A2&"*",$A$8:$B$11,2,FALSE)
 
Upvote 0
try
=VLOOKUP("*"&A2&"*",$A$8:$B$11,2,FALSE)

BUT it will find the first one in the list - if you have this more then once

for example anything with 10 gym in the first wil be found

9 months does no match anything nor does N/A
so how will the A and B - be combined to match ????
can you give more examples and expected results

Book3
ABC
1Productsubscriptionprice?
210 Gym2 years500
3blockbuster9 months50
4Olive Gardenn/a10
5
6
7ProductPrice
82 year 10 gym membership500
91 year blockbuster card50
103 year 10 gym membership100
11Olive Garden gift card10
Sheet1
Cell Formulas
RangeFormula
C2:C4C2=VLOOKUP("*"&A2&"*",$A$8:$B$11,2,FALSE)
Thank you! This is a start. Can the formula void "Olive Garden" since there is not a 2nd partial match?
try
=VLOOKUP("*"&A2&"*",$A$8:$B$11,2,FALSE)

BUT it will find the first one in the list - if you have this more then once

for example anything with 10 gym in the first wil be found

9 months does no match anything nor does N/A
so how will the A and B - be combined to match ????
can you give more examples and expected results

Book3
ABC
1Productsubscriptionprice?
210 Gym2 years500
3blockbuster9 months50
4Olive Gardenn/a10
5
6
7ProductPrice
82 year 10 gym membership500
91 year blockbuster card50
103 year 10 gym membership100
11Olive Garden gift card10
Sheet1
Cell Formulas
RangeFormula
C2:C4C2=VLOOKUP("*"&A2&"*",$A$8:$B$11,2,FALSE)
Thank you! Here is a little more context. My company is working on budgets and our vendors data has been all over the place. I need to match the last price we paid for the product but our invoice is broken into 2 columns whereas their data set is combined. Id like to void/ignore any results that don't contain both, or parts of both criteria

PH_Sales_Pivot_View (32).xls
ABC
1Search criteria
2ProductSupportPrice?
3xByte for 1 Virtual MachineProduction Support and Subscription
4xByte PRO per service unitBasic Support and Subscription
5
6
7Data Source
8ProductLast Price Paid
9Upgrade: xByte 8 Enterprise for 1 Virtual Machine$ 1,200.00
10xByte Data Store - 1 TiB for 3 years$ 999.00
11Production Support/Subscription for xByte for 1 Virtual Machine for 3 years$ 999.00
12Technical account manager for xByte PRO15000
Sheet3
 
Upvote 0
our invoice is broken into 2 columns whereas their data set is combined.

looks like the information is not a combination of the 2 fields
fo example
xByte for 1 Virtual Machine
and
Production Support and Subscription
is not an exact match anywhere of the 2 in the single text
only 1 of the colums is with the text as shown in red
the blue and yellow do not match

Production Support/Subscription for xByte for 1 Virtual Machine for 3 years

so in the examples you showed - none will match

maybe i'm misunderstanding , how you want a match to work
 
Upvote 0

Forum statistics

Threads
1,215,095
Messages
6,123,073
Members
449,093
Latest member
ripvw

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