Separating data in a row into new rows
Il 25/07/2012 18:16, MortenPetterson ha scritto:
Hi there,
I have a database of client records which holds information that I need
to create individual records for. I have exported it to excel, which
gives all the client info in one row but I need to separate this out by
"plan" so that the general client info is copied down to each new record
- does anyone have any idea as to how I go about this? The number of
plans for each client varies.
The attachment shows an example of what I currently have and then what I
am trying to achieve - I hope it clarifies the situation.
Many thanks,
Martin
+-------------------------------------------------------------------+
|Filename: Creating plan records.JPG |
|Download: http://www.excelbanter.com/attachment.php?attachmentid=495|
+-------------------------------------------------------------------+
Without using VBA, I suppose data are in range A1:K31
In L1 insert 1
In L2 insert =L1+(ROW()M1+1)
In M2 insert =COUNTA(INDIRECT("$D$2:$K"&L2))
In N2 insert =INDEX($A$1:$K$31,$L2,COLUMN(A1))
In O2 insert =INDEX($A$1:$K$31,$L2,COLUMN(B1))
In P2 insert =INDEX($A$1:$K$31,$L2,COLUMN(C1))
In Q2 insert =INDEX($A$1:$K$31,$L2,COLUMN(C1)+COUNTIF($L$2:$L2, $L2))
Copy down range L2:Q2 as it need.
Hi,
E.
|