Having a problem matching columns

RVD1234

New Member
Joined
Jun 6, 2016
Messages
6
I used a few split text functions, (aka: right, left, find) and split the text into what I finally wanted. Now I want the new column of text to equal another column and only some of the text is matching up. For example, it kind of looks like this:

First Column Split Column Abbr Abbr Match Result
singled to shortstop (2-2) singled to shortstop S6 singled to shortstop S6
flied out to cf (1-0) flied out to cf FO8 flied out to cf blank

So basically, whenever the split column equals the abbr match column, I want the result column to equal the abbr column. My issue is that sometimes it works and sometimes it doesn't and there doesn't seem to be a distinction as to why. I've seen if one cell equals another one, and the same thing happens, sometimes they're equal, sometimes they're not. I hope you can help and if I wasn't clear, I can try to explain another way. Thanks!
 

Excel Facts

Highlight Duplicates
Home, Conditional Formatting, Highlight Cells, Duplicate records, OK to add pink formatting to any duplicates in selected range.
ei2ser.png
[/IMG]
 
Upvote 0
Because my original post didn't lay out like I wanted it to, this is what I'm working with. For example, A29 should equal C5. If it did, it would put B29 into D5. However, since Excel does not recognize that A29=C5, it doesn't work. However, it sees that C19 is equal to A10 so B10=D19.
 
Upvote 0
Not quite enough here to be sure, but...
Is there a VLookup in Column D to return your match code? If so, some results are not returning due to not being exact matches; try using the trim function to match lookup words by eliminated spaces, blanks, etc:
=VLOOKUP(TRIM(C2),$A$1:$B$100,2,FALSE)
 
Upvote 0
So I used a VLookup in Column D (=IFERROR(VLOOKUP(C2,A:B, 2, 0), "")). I used the Trim (actually, I just put the trim into my original equation (=IFERROR(VLOOKUP(TRIM(C5),A:B, 2, 0), "")) and it gave me the values that I was missing but took away everything else I had before. So if there's a way to put the two together, we're in business
 
Upvote 0
Yeah, you could literally combine them:
=IFERROR(VLOOKUP(C2,A:B,2,0),IFERROR(VLOOKUP(TRIM(C5),A:B, 2, 0), ""))

Also, sounds like you could Trim your Column A, then base the Lookup off that.
 
Upvote 0

Forum statistics

Threads
1,214,833
Messages
6,121,857
Members
449,051
Latest member
excelquestion515

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