From: KKD on 1 Apr 2010 11:59 The data I am bringing in to Excel comes in two rows for a single record. I need to reformat it so that all of the data is on one line. As there are several thousand records, I need to do find a way to automate this. Any suggestions? -- KKD
From: Ms-Exl-Learner on 1 Apr 2010 12:15 May be this... https://www.microsoft.com/office/community/en-us/default.mspx?dg=microsoft.public.excel.worksheet.functions&mid=68c108bb-045d-40e5-9187-a5785baa67be&sloc=en-us -------------------- (Ms-Exl-Learner) -------------------- "KKD" wrote: > The data I am bringing in to Excel comes in two rows for a single record. I > need to reformat it so that all of the data is on one line. As there are > several thousand records, I need to do find a way to automate this. > > Any suggestions? > -- > KKD
From: מיכאל (מיקי) אבידן on 1 Apr 2010 12:16 To my opinion it will be very difficult or impossible a solution if the without having the Data in front of us. However, you may try to record a Macro of the Cutting/Pasting the data from the 2nd. row, up to the 1st. row and Deleting the empty 2nd. row. All this should be "nested" within some sort of loop. Micky "KKD" wrote: > The data I am bringing in to Excel comes in two rows for a single record. I > need to reformat it so that all of the data is on one line. As there are > several thousand records, I need to do find a way to automate this. > > Any suggestions? > -- > KKD
From: Don Guillett on 1 Apr 2010 12:36 Try Option Explicit Sub putononelinepereach() 'assumes NO HEADER row Dim lr As Long Dim i As Long Dim slc As Long Dim dlc As Long lr = Application.RoundUp(Cells(Rows.Count, 1) _ .End(xlUp).Row / 2, 0) * 2 For i = lr To 2 Step -2 slc = Cells(i, Columns.Count).End(xlToLeft).Column dlc = Cells(i - 1, Columns.Count).End(xlToLeft).Column + 1 Cells(i, 1).Resize(, slc).Copy Cells(i - 1, dlc) Rows(i).Delete Next i End Sub -- Don Guillett Microsoft MVP Excel SalesAid Software dguillett(a)gmail.com "KKD" <KKD(a)discussions.microsoft.com> wrote in message news:95A15B9A-9629-4061-AD99-184100397173(a)microsoft.com... > The data I am bringing in to Excel comes in two rows for a single record. > I > need to reformat it so that all of the data is on one line. As there are > several thousand records, I need to do find a way to automate this. > > Any suggestions? > -- > KKD
From: KKD on 1 Apr 2010 12:40
the data is fairly simple: 1234 abcd xyz Name I want the data piece "name" to be moved into the above row in its own cell. 1234 abcd xyz Name When I bring the data in, I am using the "text to columns" function as it all comes into column A only. If you think a macro is the only way, can you instruct how to go about that? -- KKD "מיכאל (מיקי) אבידן" wrote: > To my opinion it will be very difficult or impossible a solution if the > without having the Data in front of us. > However, you may try to record a Macro of the Cutting/Pasting the data from > the 2nd. row, up to the 1st. row and Deleting the empty 2nd. row. > All this should be "nested" within some sort of loop. > Micky > > > "KKD" wrote: > > > The data I am bringing in to Excel comes in two rows for a single record. I > > need to reformat it so that all of the data is on one line. As there are > > several thousand records, I need to do find a way to automate this. > > > > Any suggestions? > > -- > > KKD |