LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22
Default Looping question for 2 columns

Hello,

I have data as such:
A B
1 this is line 1 1
2 2
3 3
4 4
5 this is line 2 1
6 2
7 3
8 4


and want to change it to
A B C D E
this is line 1 1 2 3 4
this is line 2 1 2 3 4




I figure I want to find the first row in column A with a value in it and
then select row 1:4 and copy/paste select:transpose and then delete the
three rows below A1 before moving to A5 but I am not sure how to loop this.

I know how to determine how many lines in col B will need to be copy/pasted.

Dim WorkRange As Range
If TypeName(Selection) < "Range" Then Exit Sub
Set WorkRange = Range("B:B")
NumSegments = Application.Max(WorkRange)
MsgBox (NumSegments)


Any suggestions?

Lance

 
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
Looping question Jase Excel Discussion (Misc queries) 2 March 19th 08 02:03 PM
Looping Question lee New Users to Excel 3 August 4th 06 04:23 PM
Looping Question MWS Excel Discussion (Misc queries) 1 June 5th 06 07:23 PM
looping across columns in range? Amy Excel Discussion (Misc queries) 3 July 19th 05 08:01 PM
looping question luke New Users to Excel 4 June 3rd 05 01:19 PM


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