Vlookup help, comparing list

Full Spool

New Member
Joined
Dec 31, 2012
Messages
22
Office Version
  1. 365
Platform
  1. Windows
Hello,

I am having issues comparing 2 rows with vlookup. My issue is some of my numbers have a "-5" after a series of numbers. Vlookup thinks the numbers
don't exist in my reference data. I don't know how to fix my formula to ignore the "-5" and look at the numbers before so it can draw
a correct comparison.

My formula below "
=VLOOKUP(D2,Mapping!$A$2:$A$61,1,FALSE)

You can see when the -5 is in the Billing Tab and on the Mapping Tab in excel it works. However once the -5 is missing in the billing tab
it no longer correlates.

1611950186012.png


Thanks in advance for any help or direction provided.
 

jtakw

Well-known Member
Joined
Jun 29, 2014
Messages
5,852
Office Version
  1. 2016
Platform
  1. Windows
Hi,

Based on your example, I don't think this will be an issue, but the SEARCH function is looking for a sequence of numbers in your case. In the example below cells A3 and A4 are different, but the SEARCH finds the value of cell B1 in both cells and returns a number (starting position). Something to be aware of.

Book1
AB
1Search16382-2
2
316382-21
4516382-22
Sheet3
Cell Formulas
RangeFormula
B3:B4B3=SEARCH($B$1,A3)

Add unique character or space to avoid this problem.

Book3.xlsx
AB
1Search16382-2
2
316382-21
4516382-2#VALUE!
Sheet814
Cell Formulas
RangeFormula
B3:B4B3=SEARCH(" "&B$1&" "," "&A3&" ")
 

Some videos you may like

Excel Facts

Can you AutoAverage in Excel?
There is a drop-down next to the AutoSum symbol. Open the drop-down to choose AVERAGE, COUNT, MAX, or MIN

Watch MrExcel Video

Forum statistics

Threads
1,127,152
Messages
5,623,069
Members
415,950
Latest member
Kindz

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
Top