PC Review


Reply
Thread Tools Rate Thread

combining multiple rows into one row

 
 
Randy Allen
Guest
Posts: n/a
 
      9th May 2009
Can anyone help with this issue? I have a spreadsheet with 3 rows of
data that I need to put on one row, then skip down 4 rows and pull the
next 3 rows of data into one row. Finally, I need all the rows together,
without blank rows between them.

The 3 rows are set up like this:
Row 1 - data in cells A - D
Row 2 - data in cells A - K
Row 3 - data in cells A - I

I need the data from the 3 rows put into 1 row - cells A - X.

The next set of data is 4 rows down. For example: the 1st set of data
begins on row 1, the next set on row 5, the next on row 9. I need the
program to repeat until all the data on the sheet is modified.

If anyone can help, I would really appreciate it.



*** Sent via Developersdex http://www.developersdex.com ***
 
Reply With Quote
 
 
 
 
Don Guillett
Guest
Posts: n/a
 
      9th May 2009
Here is one I did for someone a couple of days ago. Modify to suit.

Sub lineemup()
dim i, lc1, lc2 As Long

Application.ScreenUpdating = False
Application.Calculation = xlCalculationManual
Cells.WrapText = False

For i = Cells(Rows.Count, 1).End(xlUp).Row To 2 Step -1

If Cells(i - 1, 1) = Cells(i, 1) Then
lc1 = Cells(i - 1, Columns.Count).End(xlToLeft).Column + 1
lc2 = Cells(i, Columns.Count).End(xlToLeft).Column
Cells(i, 2).Resize(1, lc2).Copy Cells(i - 1, lc1)
Rows(i).Delete
End If

Next

Application.Calculation = xlCalculationAutomatic
Application.ScreenUpdating = True
End Sub

--
Don Guillett
Microsoft MVP Excel
SalesAid Software
(E-Mail Removed)
"Randy Allen" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Can anyone help with this issue? I have a spreadsheet with 3 rows of
> data that I need to put on one row, then skip down 4 rows and pull the
> next 3 rows of data into one row. Finally, I need all the rows together,
> without blank rows between them.
>
> The 3 rows are set up like this:
> Row 1 - data in cells A - D
> Row 2 - data in cells A - K
> Row 3 - data in cells A - I
>
> I need the data from the 3 rows put into 1 row - cells A - X.
>
> The next set of data is 4 rows down. For example: the 1st set of data
> begins on row 1, the next set on row 5, the next on row 9. I need the
> program to repeat until all the data on the sheet is modified.
>
> If anyone can help, I would really appreciate it.
>
>
>
> *** Sent via Developersdex http://www.developersdex.com ***


 
Reply With Quote
 
Randy Allen
Guest
Posts: n/a
 
      10th May 2009
Thank you, I was able to get everything working with your help.



*** Sent via Developersdex http://www.developersdex.com ***
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Combining multiple rows dagdee Microsoft Excel New Users 1 22nd Oct 2009 12:51 PM
Combining data from multiple rows Sarah (OGI) Microsoft Excel Misc 2 5th Aug 2008 06:17 PM
Combining Multiple Rows =?Utf-8?B?TWljaGFlbA==?= Microsoft Access Queries 3 7th Feb 2007 10:19 PM
Combining multiple rows to one mbfriesen@gmail.com Microsoft Excel Programming 1 10th Nov 2006 08:33 PM
Combining Rows with multiple records =?Utf-8?B?RGVuaW5l?= Microsoft Excel Worksheet Functions 1 22nd Oct 2004 03:29 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 09:37 PM.