Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 39
Default Combine consecutive Rows

Hello All,
I am using Office XP and have the following problem.

I have downloaded some data from the Internet as follows:

E.g.
1 Aaa
2 Bbb
3 Ccc
4 Ddd
5 Eee
6 Fff
7 Ggg
8 Hhh
....
....
....
...

I wish to combine data of consecutive rows as follows:

1 Aaa Bbb
2 <Blank
3 Ccc Ddd
4 <Blank
....
....
..
At present I am using Edit-Cut-Paste. I hope there is a macro which
can run on consecutive rows (which I can select) and have the results
as desired.

I have seen the threads and there are many macros and most of them use
a common value in Column A...In my case there is no common value.. I
just need to combine consecutive rows as shown above

At present it takes up lot of time as there are several hundred rows
to work with.

Thanks in advance.

Rashid Khan

  #2   Report Post  
Posted to microsoft.public.excel.programming
Jay Jay is offline
external usenet poster
 
Posts: 671
Default Combine consecutive Rows

Here's one approach:

Sub prkhan56()
Set lz = ActiveCell

Do
ActiveCell = ActiveCell & Chr(32) & ActiveCell.Offset(1, 0)
ActiveCell.Offset(1, 0).Clear
ActiveCell.End(xlDown).Activate
Loop Until ActiveCell = ""

lz.activate
End Sub

--
Jay


" wrote:

Hello All,
I am using Office XP and have the following problem.

I have downloaded some data from the Internet as follows:

E.g.
1 Aaa
2 Bbb
3 Ccc
4 Ddd
5 Eee
6 Fff
7 Ggg
8 Hhh
....
....
....
...

I wish to combine data of consecutive rows as follows:

1 Aaa Bbb
2 <Blank
3 Ccc Ddd
4 <Blank
....
....
..
At present I am using Edit-Cut-Paste. I hope there is a macro which
can run on consecutive rows (which I can select) and have the results
as desired.

I have seen the threads and there are many macros and most of them use
a common value in Column A...In my case there is no common value.. I
just need to combine consecutive rows as shown above

At present it takes up lot of time as there are several hundred rows
to work with.

Thanks in advance.

Rashid Khan


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
Formula from consecutive rows to alternate rows? Neville Bailey[_2_] Excel Discussion (Misc queries) 2 March 25th 10 01:58 PM
How do I combine worksheets w/o enough rows to combine? Amanda W. Excel Worksheet Functions 3 June 9th 09 07:26 AM
Transposing data from consecutive rows into non-consecutive rows econ Excel Discussion (Misc queries) 0 March 10th 08 07:24 PM
Inserting multiple rows in excel with data in consecutive rows technotronic Excel Programming 2 October 20th 05 03:12 PM
Select two consecutive rows Bruce Roberson Excel Programming 8 July 31st 03 03:06 PM


All times are GMT +1. The time now is 11:19 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"