Please help. Vlooup trouble

Cooper_Smith

New Member
Joined
Jun 7, 2013
Messages
3
Hello All,

Thank you in advance for your help. Here is the problem I am having. I am trying create a table that looks at one cell reference, finds that same text in a table, and returns an Id related to the number. The cell I am referencing has both txt and numbers (ex. 123 Company, Inc.).
The table that I am using for the TableArry in my Vlookup formula may not necessary have the exact same data (ex. 123 Company). The ID i would like it to return is a long string that includes both numbers and text as well (Ex. 00123141ABCDE).

I have been getting a number of errors. When the data is an exact match and I use (FALSE - Exact Match), the vlookup is returning an N/A error. When the data is an exact match and I use (True - Approximate Match), it returns that last cell in my lookuparray table. I read something about the Col_index_number needing to be smaller than the cell reference, but that is not the case here as I am using txt & number strings.

Should I use another formula? Or is their a way to fix this with a vlookup???

Thanks!
 

Excel Facts

Can a formula spear through sheets?
Use =SUM(January:December!E7) to sum E7 on all of the sheets from January through December
Can you post up several rows of data and the expected result and what you are actually seeing?

Thanks,
Chris
 
Upvote 0
Account IDAccount OwnerAccount NameBilling StreetAccount NameBilling StreetAccount IDformula
00001111ABCDJonABC Company 123, Inc.100 Test AvenueABC Company100 Test Ave002222DEFGVLOOKUP(G2,A1:D3,1)
002222DEFGKellyTest Company200 California StreetABC Company, Inc.100 Test Avenue002222DEFGVLOOKUP(F3,A1:D3,1)
Test Company, Inc.200 California St.
Test Company200 California Street

<tbody>
</tbody>

The second column of "Account ID" are the results I am getting. They do not align with the actual account IDs/
Thanks!
 
Upvote 0
Hi,

OK, so the reason you are getting an error is that you are saying you are trying to look for 123 Company, Inc on what sheet but then this could be 123 Co.Inc on another (I.e. different, as an example)

If so, using false will return #N/A as it needs to be an EXACT match...........Where as using TRUE will be unreliable, as it won't always be the closest match that you'd actually select yourself......

How different is your data between sheets? Are there any consistencies?

If so, for instance, you could do a search on the first five letters or something?

Enter the below and use CTRL + SHIFT +ENTER To enter it........It will only work if you do this.....You should see { } brackets appear automatically if it's done correctly.

=vlookup(left(G2,5),Left(A1:D3,5),1,FALSE)

Still not foolproof but might help you out with 90% of them......Worth a shot.

Regards,
Chris
 
Upvote 0
Hi,

OK, so the reason you are getting an error is that you are saying you are trying to look for 123 Company, Inc on what sheet but then this could be 123 Co.Inc on another (I.e. different, as an example)

If so, using false will return #N/A as it needs to be an EXACT match...........Where as using TRUE will be unreliable, as it won't always be the closest match that you'd actually select yourself......

How different is your data between sheets? Are there any consistencies?

If so, for instance, you could do a search on the first five letters or something?

Enter the below and use CTRL + SHIFT +ENTER To enter it........It will only work if you do this.....You should see { } brackets appear automatically if it's done correctly.

=vlookup(left(G2,5),Left(A1:D3,5),1,FALSE)

Still not foolproof but might help you out with 90% of them......Worth a shot.

Regards,
Chris

Reply >>

So it turns out the problem was the order in which the columns were placed. The column that the lookup values were in in the lookuparry needed to be before the column that I was returning the Ids from.

The problem still exists that the data is not consistent. Only about half are.

Thanks.
 
Upvote 0

Forum statistics

Threads
1,215,694
Messages
6,126,252
Members
449,305
Latest member
Dalyb2

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