ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Matching names and inserting spaces (https://www.excelbanter.com/excel-worksheet-functions/256201-matching-names-inserting-spaces.html)

ILunacy

Matching names and inserting spaces
 
I hope someone can help me out with this. Say I have column A filled with
like 500 names, and column B filled with 300 of the same names. Is there a
way or a formula to match the names in column B to the corresponding names in
column A, move the name in B to be in the same row as the name in A, and to
insert blank cells into B where there are no names to match A?

Example:

A B
Abe Abe
Brad Brian
Brian Chris
Chris

changed to:

A B
Abe Abe
Brad
Brian Brian
Chris Chris

Thanks

Xt

Matching names and inserting spaces
 
On Feb 13, 10:28*am, ILunacy
wrote:
I hope someone can help me out with this. Say I have column A filled with
like 500 names, and column B filled with 300 of the same names. Is there a
way or a formula to match the names in column B to the corresponding names in
column A, move the name in B to be in the same row as the name in A, and to
insert blank cells into B where there are no names to match A?

Example:

* * *A * * * * * * * * * * * B
Abe * * * * * * * * * Abe
Brad * * * * * * * * *Brian
Brian * * * * * * * * Chris
Chris

changed to:

* * *A * * * * * * * * * * * B
Abe * * * * * * * * * Abe
Brad
Brian * * * * * * * * Brian
Chris * * * * * * * *Chris

Thanks


Try this in C1 =IF(ISNA(VLOOKUP(A1,B:B,1,0)),"",VLOOKUP(A1,B:B,1) )
and copy down to give the column you want.
xt

Teethless mama

Matching names and inserting spaces
 
Assuming your data in A1:A5 & B1:B3

In C1: IF(COUNTIF($B$1:$B$3,A1),A1,"")

copy down to C5, select C1:C5 then right click to copy and paste special
value to columnB then delete column C


"ILunacy" wrote:

I hope someone can help me out with this. Say I have column A filled with
like 500 names, and column B filled with 300 of the same names. Is there a
way or a formula to match the names in column B to the corresponding names in
column A, move the name in B to be in the same row as the name in A, and to
insert blank cells into B where there are no names to match A?

Example:

A B
Abe Abe
Brad Brian
Brian Chris
Chris

changed to:

A B
Abe Abe
Brad
Brian Brian
Chris Chris

Thanks


ILunacy

Matching names and inserting spaces
 
Thank You! This was very helpful! I have a new question that goes along with
this. Is there a way to expand on the cell selection? Besides the names in
Column B, I also have data in Columns C, D, E, & F that I need to keep with
the names in Column B. Thanks Again!

"Xt" wrote:

On Feb 13, 10:28 am, ILunacy
wrote:
I hope someone can help me out with this. Say I have column A filled with
like 500 names, and column B filled with 300 of the same names. Is there a
way or a formula to match the names in column B to the corresponding names in
column A, move the name in B to be in the same row as the name in A, and to
insert blank cells into B where there are no names to match A?

Example:

A B
Abe Abe
Brad Brian
Brian Chris
Chris

changed to:

A B
Abe Abe
Brad
Brian Brian
Chris Chris

Thanks


Try this in C1 =IF(ISNA(VLOOKUP(A1,B:B,1,0)),"",VLOOKUP(A1,B:B,1) )
and copy down to give the column you want.
xt
.



All times are GMT +1. The time now is 10:36 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com