ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Combine several records into one (https://www.excelbanter.com/excel-discussion-misc-queries/17385-combine-several-records-into-one.html)

[email protected]

Combine several records into one
 
Greetings,

I have a database of magazine subscriptions in which each record
represents a single subscription. There are multiple subscriptions to
many of the magazines and I'd like to take a group of records like
those below and combine them into one record.

This new record could replace the first record, could be a new record
on the existing sheet, could replace all the records on which it is
based, or could be on a new sheet. I only need one method.

Thanks for your attention.
Tom


Title Branch code

AMERICAN GIRL /**/ AH
AMERICAN GIRL /**/ AU
AMERICAN GIRL /**/ CA
AMERICAN GIRL /**/ CL
AMERICAN GIRL /**/ CL
AMERICAN GIRL /**/ EA
AMERICAN GIRL /**/ KE
AMERICAN GIRL /**/ LA
AMERICAN GIRL /**/ MO
AMERICAN GIRL /**/ RE
AMERICAN GIRL /**/ SC
AMERICAN GIRL /**/ SU
AMERICAN GIRL /**/ WQ


New record
AMERICAN GIRL /**/ AH,AU,CA,CL.....


CLR


Assuming your data is in columns A, B, and C, with headers in row
1...........

In D2 put =A2&B2&C2
In D3 put =IF(A3=A2,D2&","&C3,A3&B3&C3), and copy down...........

This will make the bottom entry for each magazine to have the result you
want.........delete the rest...

hth
Vaya con Dios,
Chuck, CABGx3



wrote in message
oups.com...
Greetings,

I have a database of magazine subscriptions in which each record
represents a single subscription. There are multiple subscriptions to
many of the magazines and I'd like to take a group of records like
those below and combine them into one record.

This new record could replace the first record, could be a new record
on the existing sheet, could replace all the records on which it is
based, or could be on a new sheet. I only need one method.

Thanks for your attention.
Tom


Title Branch code

AMERICAN GIRL /**/ AH
AMERICAN GIRL /**/ AU
AMERICAN GIRL /**/ CA
AMERICAN GIRL /**/ CL
AMERICAN GIRL /**/ CL
AMERICAN GIRL /**/ EA
AMERICAN GIRL /**/ KE
AMERICAN GIRL /**/ LA
AMERICAN GIRL /**/ MO
AMERICAN GIRL /**/ RE
AMERICAN GIRL /**/ SC
AMERICAN GIRL /**/ SU
AMERICAN GIRL /**/ WQ


New record
AMERICAN GIRL /**/ AH,AU,CA,CL.....




[email protected]

Chuck, thank you very much for your help. It's really quite
straightforward and, using your model, I see how to add another column
which will identify the last record for a particular title. Thanks
again.

Tom


CLR

You're welcome tom, I'm glad you got it working, and thanks for the
feedback.

Vaya con Dios,
Chuck, CABGx3


wrote in message
oups.com...
Chuck, thank you very much for your help. It's really quite
straightforward and, using your model, I see how to add another column
which will identify the last record for a particular title. Thanks
again.

Tom





All times are GMT +1. The time now is 10:53 AM.

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