Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15
Default Appending or Concatenating rows by Client

I currently have multiple rows per client in a worksheet and would like to
reduce it to ONE row per client. However, I would like to
capture the information from each of the rows when reducing to one row.

For example:
Client No |Account_No|Deposit |
75 1000 700
75 2000 200
62 4500 150
62 5000 500
62 5500 250

I would like it to be:
Client No|Accnt No_a|Accnt No_b|Accnt No_c|Deposit_a|Deposit_b|Deposit_c|
75 1000 2000 700 200
62 4500 5000 5500 150 500
250

Is there a way to do that?

Many thanks,
Dina

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,718
Default Appending or Concatenating rows by Client

Assume your data in A1:C6 with a header in row 1
Criteria in A9 down with a header in row 8

The formulas belowed required ctrl+shift+enter, not just enter

In B9:
=IF(ISERR(SMALL(IF(Client=$A9,ROW(INDIRECT("1:"&RO WS(Account)))),COLUMNS($A:A))),"",INDEX(Account,SM ALL(IF(Client=$A9,ROW(INDIRECT("1:"&ROWS(Account)) )),COLUMNS($A:A))))

copy across to D9

In E9:
=IF(ISERR(SMALL(IF(Client=$A9,ROW(INDIRECT("1:"&RO WS(Account)))),COLUMNS($A:A))),"",INDEX(Deposit,SM ALL(IF(Client=$A9,ROW(INDIRECT("1:"&ROWS(Account)) )),COLUMNS($A:A))))

coppy across to G9
select B9:G9 and copy down


"Dina" wrote:

I currently have multiple rows per client in a worksheet and would like to
reduce it to ONE row per client. However, I would like to
capture the information from each of the rows when reducing to one row.

For example:
Client No |Account_No|Deposit |
75 1000 700
75 2000 200
62 4500 150
62 5000 500
62 5500 250

I would like it to be:
Client No|Accnt No_a|Accnt No_b|Accnt No_c|Deposit_a|Deposit_b|Deposit_c|
75 1000 2000 700 200
62 4500 5000 5500 150 500
250

Is there a way to do that?

Many thanks,
Dina

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15
Default Appending or Concatenating rows by Client

Thank you very much for the solution. I have a follow-up question:

I am dealing with a larget number of rows, number of clients and number of
variables (columns). Is there a way in excel to generate the variable names
in the result table automatically:

Ex:
Initially
Client no | Account no | Deposit no | Withdrawal no | closing date| etc etc
etc

Result
Client no | Account no 1 | Account no 2| |Account no 3| |Account no 4|
|Deposit no 1| Deposit no 2| Deposit no 3| |Deposit no 4| |Withdrawal no 1|
etc etc

Is there way in excel to generate the above column headings automatically?

Thannk you very much






"Teethless mama" wrote:

Assume your data in A1:C6 with a header in row 1
Criteria in A9 down with a header in row 8

The formulas belowed required ctrl+shift+enter, not just enter

In B9:
=IF(ISERR(SMALL(IF(Client=$A9,ROW(INDIRECT("1:"&RO WS(Account)))),COLUMNS($A:A))),"",INDEX(Account,SM ALL(IF(Client=$A9,ROW(INDIRECT("1:"&ROWS(Account)) )),COLUMNS($A:A))))

copy across to D9

In E9:
=IF(ISERR(SMALL(IF(Client=$A9,ROW(INDIRECT("1:"&RO WS(Account)))),COLUMNS($A:A))),"",INDEX(Deposit,SM ALL(IF(Client=$A9,ROW(INDIRECT("1:"&ROWS(Account)) )),COLUMNS($A:A))))

coppy across to G9
select B9:G9 and copy down


"Dina" wrote:

I currently have multiple rows per client in a worksheet and would like to
reduce it to ONE row per client. However, I would like to
capture the information from each of the rows when reducing to one row.

For example:
Client No |Account_No|Deposit |
75 1000 700
75 2000 200
62 4500 150
62 5000 500
62 5500 250

I would like it to be:
Client No|Accnt No_a|Accnt No_b|Accnt No_c|Deposit_a|Deposit_b|Deposit_c|
75 1000 2000 700 200
62 4500 5000 5500 150 500
250

Is there a way to do that?

Many thanks,
Dina

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
shared workbook appending/merging rows of data from several worksh Smilingout_loud Excel Discussion (Misc queries) 1 December 26th 06 07:52 PM
Appending Text Jamen McGranahan Excel Discussion (Misc queries) 2 September 11th 06 11:10 PM
Appending worksheets Guillermo Scharffenorth New Users to Excel 1 March 7th 06 12:48 AM
concatenating rows from different sheets ExcelWolfie Excel Worksheet Functions 1 January 27th 06 05:31 PM
Appending a second csv file Rick Excel Discussion (Misc queries) 3 March 9th 05 06:21 PM


All times are GMT +1. The time now is 07:35 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"