Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10
Default Is Pivot table the way to go?

I'm writing a VBA script for Excel 2003 that takes information from multiple
sheets
and mangles the pertinent information into one sheet. All the sheets have
the same format, just
different data.

One simple thing I'd like to do is to take column information, say from row
50
to row 100 on column 2 of sheet 2, and put it in row 1, column 1 to 50 of
sheet
IOW, I transpose the column data into row data. I'd like to be able to write
a
subroutine that does this for any 2 sheets, passing it the row range and
column
range for the sheets.


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 735
Default Is Pivot table the way to go?

No pivot table, some simple code for the subroutine....

Sub TransposeMe(wRngFrom As Range, wRngTo As Range)
wRngFrom.Copy
wRngTo.PasteSpecial Transpose:=True
Application.CutCopyMode = False
End Sub

To call it from you main code use setting the from to ranges required.....

Call TransposeMe(Sheets("Sheet2").Range("B50:B100"),
Sheets("Sheet1").Range("A1"))







--

Regards,
Nigel




"Net Doe" wrote in message
...
I'm writing a VBA script for Excel 2003 that takes information from
multiple sheets
and mangles the pertinent information into one sheet. All the sheets have
the same format, just
different data.

One simple thing I'd like to do is to take column information, say from
row 50
to row 100 on column 2 of sheet 2, and put it in row 1, column 1 to 50 of
sheet
IOW, I transpose the column data into row data. I'd like to be able to
write a
subroutine that does this for any 2 sheets, passing it the row range and
column
range for the sheets.



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10
Default Is Pivot table the way to go?

Thanks; I'll play with having the calling routine geneic too so that
I can just loop through sheets, rows, cols for example.

"Nigel" wrote in message
...
No pivot table, some simple code for the subroutine....

Sub TransposeMe(wRngFrom As Range, wRngTo As Range)
wRngFrom.Copy
wRngTo.PasteSpecial Transpose:=True
Application.CutCopyMode = False
End Sub

To call it from you main code use setting the from to ranges required.....

Call TransposeMe(Sheets("Sheet2").Range("B50:B100"),
Sheets("Sheet1").Range("A1"))







--

Regards,
Nigel




"Net Doe" wrote in message
...
I'm writing a VBA script for Excel 2003 that takes information from
multiple sheets
and mangles the pertinent information into one sheet. All the sheets have
the same format, just
different data.

One simple thing I'd like to do is to take column information, say from
row 50
to row 100 on column 2 of sheet 2, and put it in row 1, column 1 to 50 of
sheet
IOW, I transpose the column data into row data. I'd like to be able to
write a
subroutine that does this for any 2 sheets, passing it the row range and
column
range for the sheets.





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
how to create pivot table from existing pivot table in excel 2007 Udayraj Dhulekar Excel Discussion (Misc queries) 2 July 8th 13 08:22 PM
Filter lines with Pivot table and non pivot table columns Grover Charts and Charting in Excel 4 September 28th 07 03:16 AM
Filter lines with Pivot table and non Pivot table columns Grover Excel Discussion (Misc queries) 1 September 26th 07 12:48 AM
Filter lines containing pivot table and non pivot table data Grover Excel Worksheet Functions 0 September 24th 07 07:20 PM
Help required with setting up a pivot table with the source on sheet1 to have the pivot table created on sheet called "report" Diana[_5_] Excel Programming 0 August 21st 03 10:19 PM


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