COMBINE ROWS INTO SINGLE COLUMN

spectraflame

Well-known Member
Joined
Dec 18, 2002
Messages
829
Office Version
  1. 365
Platform
  1. Windows
I just need some suggestions on how to better organize the data. My output has multiple rows with the same information in all cells except for one which denotes the service type. As an example there are 3 rows of data with duplicate information however in column there is a 1, 2 or 3 to denote the service type. How can that information be combined into a single row for the account information but have the 1, 2, or 3 listed in a column for a single record.

So if I had 3 rows all with the same data except for 1, 2, or 3 in column E, the end result would give me a single row with all of the information from the first row, but have 2 and/or 3 in other columns of the same row?

There is a possibility of having only a single row with a 1, 2 or 3 meaning that customer only has a specific service type.

There is a possibility of having a duplicate row of 1, 2 or 3 which means that customer has multiple service types of that kind.
 

Excel Facts

Ambidextrous Undo
Undo last command with Ctrl+Z or Alt+Backspace. If you use the Undo icon in the QAT, open the drop-down arrow to undo up to 100 steps.
You could put a sample with generic data, use XL2BB tool, show what you have and the expected result.
 
Upvote 0
Top is raw output. Bottom is the desired result or something close to this.

Acct Connect DtAccountCustomerRev ClassProviderNameService Address
1/1/199510011COMM1JOHN123 MAIN
1/1/199510011COMM1JOHN123 MAIN
1/1/199510011COMM3JOHN123 MAIN
1/1/199510011COMM2JOHN123 MAIN
1/1/199570017COMM2ROBERT125 MAIN
1/1/199570017COMM3ROBERT125 MAIN
1/1/19955200152COMM3JIMMIE127 MAIN
1/1/19955200152COMM2JIMMIE127 MAIN
Acct Connect DtAccountCustomerRev ClassProviderNameService AddressProvider2Provider3
1/1/199510011COMM1JOHN123 MAIN23
1/1/199570017COMM2ROBERT125 MAIN3
1/1/19955200152COMM3JIMMIE127 MAIN2
 
Upvote 0
Dante Amor
EFG
1ProviderNameService Address
21JOHN123 MAIN
31JOHN123 MAIN
43JOHN123 MAIN
52JOHN123 MAIN
Hoja2

Is it always the same name and Address? if it is different what would be the result?

Dante Amor
BC
1AccountCustomer
210011
310011
410011
510011
Hoja2

Is the Account - Customer relationship always the same?

Dante Amor
EFGHI
39ProviderNameService AddressProvider2Provider3
402ROBERT125 MAIN3
Hoja2

How to know that the number 3 goes in the "Provider3" column, it seems very obvious, but I suppose that in reality you don't have a 3 in the register nor a 3 in the header.

Lastly, do you have a maximum of 3 providers?
 
Upvote 0
The address and account number will always be the same for service related to the same account. There may only be an entry with a single 1, 2, or 3, or a combination of the 3 or there could be duplicates such as having two entries with a (1), a single entry with a (2), and a single entry with a (3).
 
Upvote 0
Is this what you want

Book1
ABCDEFGHIJK
1
2Helper ColumnAcct Connect DtAccountCustomerRev ClassProviderNameService Address
3101/01/199510011COMM1JOHN123 MAIN
4201/01/199510011COMM1JOHN123 MAIN
5301/01/199510011COMM3JOHN123 MAIN
6401/01/199510011COMM2JOHN123 MAIN
7101/01/199570017COMM2ROBERT125 MAIN
8201/01/199570017COMM3ROBERT125 MAIN
9101/01/19955200152COMM3JIMMIE127 MAIN
10201/01/19955200152COMM2JIMMIE127 MAIN
11
12PROVIDER
13Acct Connect DtAccountCustomerRev ClassProviderNameService Address23
1401/01/199510011COMM1JOHN123 MAIN23
1501/01/199570017COMM2ROBERT125 MAIN 3
1601/01/19955200152COMM3JIMMIE127 MAIN2 
17
18
Sheet1
Cell Formulas
RangeFormula
A3:A10A3=COUNTIF($G$3:$G3,G3)
B14:H16B14=INDEX(B$3:B$10,AGGREGATE(15,6,1/($A$3:$A$10=1)*(ROW($A$3:$A$10)-ROW($A$3)+1),(ROW($A3:$A3)-ROW($A$3)+1)))
I14:I16,J15:J16I14=IF(MAX(IF(IF($G$3:$G$10=$G14,$F$3:$F$10)=I$13,I$13,""))=$F14,"",MAX(IF(IF($G$3:$G$10=$G14,$F$3:$F$10)=I$13,I$13,"")))
J14J14=IF(MAX(IF(IF($G$3:$G$10=$G14,$F$3:$F$10)=J$13,J$13,""))=$F$14,"",MAX(IF(IF($G$3:$G$10=$G14,$F$3:$F$10)=J$13,J$13,"")))
 
Upvote 0

Forum statistics

Threads
1,214,641
Messages
6,120,693
Members
448,979
Latest member
DET4492

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