Concantenation formula

MIZDBLACK

New Member
Joined
Oct 13, 2009
Messages
45
Hi,
I have a table of information containing names in column A and addresses in column B. Up to 4 names may reside at the same address. Can anybody give me a formula to put in col C to concantenate the names eg M Smith and J Smith and B Robson, if the addresses are the same?
Thanks.
 

Excel Facts

What is the fastest way to copy a formula?
If A2:A50000 contain data. Enter a formula in B2. Select B2. Double-click the Fill Handle and Excel will shoot the formula down to B50000.
Assuming same addresses in consecutive rows, something like

=IF(MATCH(B1,B:B,0)=ROW(),A1&IF(B2=B1," "&A2,"")&IF(B3=B1," "&A3,"")&IF(B4=B1," "&A4,""),"")

is probably the simplest way, only concatenates in the first row for the address.

The only other way I can think of if this doesn't suit, would be with an array concatenate UDF.
 
Upvote 0
Hey - that seems to work great. I just need the word 'and' or a comma inbetween the names - how can I achieve this please?:)
 
Upvote 0
=IF(MATCH(B1,B:B,0)=ROW(),A1&IF(B2=B1," "&A2,"")&IF(B3=B1," "&A3,"")&IF(B4=B1," "&A4,""),"")

Just insert the word 'and' or a comme between each pair of red double quotes, remember also to include any spaces you require between the comma or word 'and' and the names.
 
Upvote 0
Thats fantastic!
Having done that, is there any way to include in the formula somewhere that- if there is only one name for the address, copy that - then I will have a complete column of data that I can paste back in .
Am I asking too much?
Yours hopefully
 
Upvote 0
It should do that anyway, is it not doing working that way?

Have you edited the ranges to match your data?
 
Upvote 0
Sorry yes - you are right - I couldn't see the wood for the trees.
Thank you so much for your patient help!
 
Upvote 0

Forum statistics

Threads
1,224,527
Messages
6,179,357
Members
452,907
Latest member
Roland Deschain

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