Hello!
Here what's up. The columns that I want to match up are not exact matches. Multiple values from sheet1 colA can match up to one value in sheet2 colA by using the first 5 characters of the cell value.
Here is the workbook to go with the sample data set I put below.
HowDoIMatch2.xlsm
As of now, the formula is generating a 2 in the banana row. But there are no bananas documented in sheet2.
How can I get my output to Sheet1 ColB to be accurate without having to create new columns/data with truncated values for the lookup? Is it even possible?
If I use this formula in Sheet1 ColC (then copy downwards /autofill):
to grab the Sheet2 colB. It works fine except for in the cases where sheet1 colA values have no match in sheet2 colA (i.e. Sheet1 A4-banana1).![]()
Please Login or Register to view this content.
That vlookup formula will output SOMETHING because of the nature of MATCH using either -1 or 1 as a match_type option. I cannot use MATCH if I want to solve this issue...but I do not know what else to do.
Sheet1
a..........................b.........
apple1........=formula
apple2........=formula
apple3........=formula
banana1......=formula
coconut1......=formula
donut1.........=formula
Sheet2
a.....................b.....
apple123...........1
coconut123........2
donut123...........3
I know of a roundabout way to do this but I would like to stay away from "creating new data". (Create/insert a new column in Sheet2. The first row would be =Left($A2,5) then downfilled. This way I can use exact value in the MATCH formula in Sheet1's VLOOKUP.) If VBA is the only way I can "automate" this lookup output to be correct, then that is the road I'll have to take.
Bookmarks