Welcome to the Excel Forum

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed.

Seo Services company Manchester

Please Register to Remove these Ads

Please Register to Remove these Ads



Reply
  #1  
Old 01-31-2006, 08:56 AM
daroc daroc is offline
Registered User
 
Join Date: 23 Jan 2006
Posts: 11
daroc is becoming part of the community
Lightbulb help urgent

Please Register to Remove these Ads

hey guys

hows it going? I need your help once again....i have an excel file with loads of data

ie.

A ....G H I J K L
1 10465 Jason Brad Mike Jeff Heather Lebron

2 1076 Keith Jay Fred David Young Pat

and it goes all the way down to A4056.....however on a seperate sheet I need this information copied like this

SHEET 2

A B
1 10465 Jason
Brad
Mike
Jeff
Heather
Lebron

2 1076 Keith
Jay
Fred
David
Young
Pat

once again, it goes all the way down to A4056. is there a way either thru macro or thru formula for me to do this instead of copying and pasting special? help will be much appreciated; please and thank you. hope you follow what I was trying to get at.....
Reply With Quote
  #2  
Old 01-31-2006, 09:40 AM
Dave Peterson
Guest
 
Posts: n/a
Re: help urgent

How about a macro?

Option Explicit
Sub testme()
Dim curWks As Worksheet
Dim newWks As Worksheet
Dim FirstRow As Long
Dim LastRow As Long
Dim iRow As Long
Dim oRow As Long
Dim RngToCopy As Range

Set curWks = Worksheets("Sheet1")
Set newWks = Worksheets.Add

With curWks
FirstRow = 2 'headers in row 1????
LastRow = .Cells(.Rows.Count, "A").End(xlUp).Row

oRow = 1
For iRow = FirstRow To LastRow
newWks.Cells(oRow, "A").Value = .Cells(iRow, "A").Value
Set RngToCopy _
= .Range(.Cells(iRow, "B"), _
.Cells(iRow, .Columns.Count).End(xlToLeft))
RngToCopy.Copy
newWks.Cells(oRow, "B").PasteSpecial Transpose:=True
oRow = oRow + RngToCopy.Cells.Count
Next iRow
End With

End Sub

If you're new to macros, you may want to read David McRitchie's intro at:
http://www.mvps.org/dmcritchie/excel/getstarted.htm


daroc wrote:
>
> hey guys
>
> hows it going? I need your help once again....i have an excel file with
> loads of data
>
> ie.
>
> A ....G H I J
> K L
> 1 10465 Jason Brad Mike Jeff
> Heather Lebron
>
> 2 1076 Keith Jay Fred David
> Young Pat
>
> and it goes all the way down to A4056.....however on a seperate sheet I
> need this information copied like this
>
> SHEET 2
>
> A B
> 1 10465 Jason
> Brad
> Mike
> Jeff
> Heather
> Lebron
>
> 2 1076 Keith
> Jay
> Fred
> David
> Young
> Pat
>
> once again, it goes all the way down to A4056. is there a way either
> thru macro or thru formula for me to do this instead of copying and
> pasting special? help will be much appreciated; please and thank you.
> hope you follow what I was trying to get at.....
>
> --
> daroc
> ------------------------------------------------------------------------
> daroc's Profile: http://www.excelforum.com/member.php...o&userid=30753
> View this thread: http://www.excelforum.com/showthread...hreadid=506753


--

Dave Peterson
Reply With Quote
  #3  
Old 01-31-2006, 10:18 AM
daroc daroc is offline
Registered User
 
Join Date: 23 Jan 2006
Posts: 11
daroc is becoming part of the community
I am having trouble running the macro....if i send you a sample of what i am doing on excel....can you pls/kindly make the macro for me...and ill learn it from that and implement it to the rest? let me know pls...ill attach the file
Reply With Quote


Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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 Off
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Forum Jump