ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   combining multiple rows into 1 record (https://www.excelbanter.com/excel-worksheet-functions/71433-combining-multiple-rows-into-1-record.html)

ccrydr

combining multiple rows into 1 record
 
I have the following 200 or so records. I'm trying to combine the 4 rows --
A1:D1 then A2:D2 and A3:D3 finally A4-- into 1 row - A1:M1. Here is a sample:


A B
C D
1 Ships Wallace 7945
Fenron St Listville
2 CO 80003-2531 5149277418 50 - 54
3 $60,000 - $69,999 M Confirmed Owner $200,000 -
$249,999
4 12

Every 4 rows a new record begins. What is the most efficient way to do this?

Max

combining multiple rows into 1 record
 
One way ..

Assume source data in sheet: X, cols A to D, from row 1 down:

1 2 3 4
5 6 7 8
9 10 11 12
13
14 15 16 17
18 19 20 21
22 23 24 25
26
(next set of 13 cells, etc)

In a new sheet,

Put in say, A1:
=OFFSET(INDIRECT("'X'!A"&ROWS($A$1:A1)*4-3),INT((COLUMNS($A$1:A1)-1)/4),MOD(
COLUMNS($A$1:A1)-1,4))

Copy A1 across to M1, fill down until zeros appear,
signalling exhaustion of data extracted from X

For the sample data above,
we'd get it re-arranged in the desired manner, i.e.:

1 2 3 4 5 6 7 8 9 10 11 12 13
14 15 16 17 18 19 20 21 22 23 24 25 26

--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
"ccrydr" <u18691@uwe wrote in message news:5bd7847b7e9a2@uwe...
I have the following 200 or so records. I'm trying to combine the 4

rows --
A1:D1 then A2:D2 and A3:D3 finally A4-- into 1 row - A1:M1. Here is a

sample:


A B
C D
1 Ships Wallace 7945
Fenron St Listville
2 CO 80003-2531 5149277418 50 - 54
3 $60,000 - $69,999 M Confirmed Owner

$200,000 -
$249,999
4 12

Every 4 rows a new record begins. What is the most efficient way to do

this?



ccrydr via OfficeKB.com

combining multiple rows into 1 record
 
thanks max. worked perfectly!

--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...tions/200602/1

Max

combining multiple rows into 1 record
 
Pleased to hear that !
Thanks for the feedback ..
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
"ccrydr via OfficeKB.com" <u18691@uwe wrote in message
news:5bdfb3631ce52@uwe...
thanks max. worked perfectly!

--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...tions/200602/1





All times are GMT +1. The time now is 12:00 AM.

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