Using match, index to return substring

chuckf201

New Member
Joined
Nov 28, 2011
Messages
28
My spreadsheet consists of:
column A: single numbers or letters from 1-10 and a-j
column B: first-name sp last-name. (Abe Lincoln, George Washington, etc)

column f: single numbers or letters
column g: return last name only.

how can I combine both following formulas to yield the last name only in column G. (Lincoln, Washington)
=trim(RIGHT(B1,LEN(B1)SEARCH("",B1,SEARCH(" ",B11)+1)))
AND
=INDEX(B1:B11,MATCH(F1,LEFT(A1:A11,5),0),2)

Thanks

<colgroup><col width="55"></colgroup><tbody>
</tbody>
 

Excel Facts

Select all contiguous cells
Pressing Ctrl+* (asterisk) will select the "current region" - all contiguous cells in all directions.
in column G =RIGHT(B2,LEN(B2)-FIND("*",SUBSTITUTE(B2," ","*",LEN(B2)-LEN(SUBSTITUTE(B2," ","")))))
 
Upvote 0
I don't want to get the string in column B. I want to match column F with column A and return column B sub-string to column G.
in other words:
in col g: match column f with column A and return last name from column B.
 
Last edited:
Upvote 0
Looks like...

In G1 enter and copy down:

=REPLACE(VLOOKUP(F1,A:B,2,0),1,FIND(" ",VLOOKUP(F1,A:B,2,0))-1,"")
 
Upvote 0

Forum statistics

Threads
1,214,985
Messages
6,122,605
Members
449,089
Latest member
Motoracer88

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