LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #8   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3
Default I need a macro to transpose multiple columns A1-Z1, A2-X2 etc

Thanks guy's for all of your help. You were correct the first time.

The problem was that I was still seeing the old data still in the rows as
well as being shown down column A. As the 1st two entries only held 2 columns
of data I found that there was a large gap between this and the next lot of
data which I have been able to amend.

"Roger Govier" wrote:

Hi Bob

I was agreeing with your disagreeing, not disagreeing with your
disagreeing, and not agreeing with the OP's disagreeing <vbg
That's the problem with double unaries<g

The rest was just a suggestion to deal with what looks like variable
lengths of data being transposed in a fixed manner - but perhaps I have
got that wrong as well!!!

--
Regards

Roger Govier


"Bob Phillips" wrote in message
...
To quote the OP

... this moves the parts over to start in column B1 to AB1 instead of
pasteing down the column ...

which is what I disagree with.

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"Roger Govier" wrote in message
...
Hi Bob
No it doesn't
I quite agree, your code transposes down column A as requested.

But from the OP's original description, it sounded as though there
were
various "lengths" of data to be transposed as row 1 was A to Z, row 2
was A to X, row 3 was just A etc.

Maybe amending your code to count the columns used in each row would
be
prefereable as opposed to taking a fixed
24(??) columns of data each time. (also number of rows changed to
OP's
968 rather than 998)

Sub test()
Dim i As Long
Dim j As Long
Dim k As Long

Application.ScreenUpdating = False
Columns(1).Insert
j = 1
For i = 1 To 968
k = Cells(i, Columns.Count).End(xlToLeft).Column - 1
Cells(i, "B").Resize(1, k).Copy
Cells(j, "A").PasteSpecial Paste:=xlPasteAll,
Operation:=xlNone,
_
Transpose:=True
j = j + k
Next i
Application.ScreenUpdating = True
End Sub


--
Regards

Roger Govier


"Bob Phillips" wrote in message
...
No it doesn't.

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"Wombat62" wrote in message
...
Thank Bob,

I have tried this but to no avail as this moves the parts over to
start in
column B1 to AB1 instead of pasteing down the column

"Wombat62" wrote:

I have a spreadsheet that has figures in A1 to Z1, A2 to X2, A3,
A5
to
H5 to
A968, and I need all of these entries transposed to one column
in
the
same
order as they are in the columns ie B2 to Go to A2, C2 to go to
C2
etc
I can do this manually line by line which will take me forever.
I need a macro to copy each row and transpose this to the next
available
cell in column A









 
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
"Text to Columns" for many columns in Excel 2003 NickName Excel Discussion (Misc queries) 12 September 8th 06 10:14 PM
Error using a macro to print multiple pages. [email protected] Excel Discussion (Misc queries) 2 June 21st 06 06:47 AM
macro to compile columns on multiple sheets simonsmith Excel Discussion (Misc queries) 2 May 9th 06 04:06 PM
Closing File Error jcliquidtension Excel Discussion (Misc queries) 4 October 20th 05 12:22 PM
Convert multiple columns to rows Lois Lane Excel Worksheet Functions 8 January 10th 05 12:47 AM


All times are GMT +1. The time now is 02:11 PM.

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"