Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default combining multiple rows into one row

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 ***
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,124
Default combining multiple rows into one row

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

"Randy Allen" wrote in message
...
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 ***

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default combining multiple rows into one row

Thank you, I was able to get everything working with your help.



*** Sent via Developersdex http://www.developersdex.com ***
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
Combining multiple rows dagdee New Users to Excel 1 October 22nd 09 12:51 PM
Combining data from multiple rows Sarah (OGI) Excel Discussion (Misc queries) 2 August 5th 08 06:17 PM
Combining same data in multiple rows Susienak Excel Discussion (Misc queries) 4 August 4th 08 11:38 PM
Combining multiple rows to one [email protected] Excel Programming 1 November 10th 06 08:33 PM
Combining data from multiple rows Budo Excel Programming 0 November 2nd 06 12:34 PM


All times are GMT +1. The time now is 07:15 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"