#1   Report Post  
Esrei
 
Posts: n/a
Default Macro 2

Range("A2:D2").Select
Selection.Copy
Sheets("Sheet2").Select
Selection.PasteSpecial Paste:=xlAll,
Operation:=xlNone, SkipBlanks:=False _
, Transpose:=True
Sheets("Sheet1").Select
Range("A2" xlDropDown)
If Cells (row_index, "A").Value <
End Sub

I know I need a bid more experience but learning as I go.
I want to copy lines to a sheet, transposed, and print.
Then the macro must go to the next line and do this again
and stop at the last line.
  #2   Report Post  
Earl Kiosterud
 
Posts: n/a
Default

Esrei,

Try this:

Sub PrintTransposed()
Sheets("Sheet2").Select
Sheets("Sheet2").Range("B4").Select ' set printout location
Sheets("Sheet1").Select
Range("A2:D2").Select ' first row to process
Do While ActiveCell < ""
Selection.Copy
Sheets("Sheet2").Select
Selection.PasteSpecial Paste:=xlAll, Operation:=xlNone, SkipBlanks:=False
_
, Transpose:=True
ActiveWindow.SelectedSheets.PrintPreview ' use for testing
'ActiveWindow.SelectedSheets.PrintOut ' use for real printing
Sheets("Sheet1").Select ' back to sheet 1
Selection.Offset(1, 0).Select ' move down ' move selection down
Loop
End Sub

It only looks at the cell in column A, and stops when it's empty. The
Printout line is "remmed out" now. When it's working correctly with the
PrintPreview, switch the apostrophe (') with the other line

I would have recommended a more meaningful subject line for this post, like
"Macro to print rows transposed."

--
Earl Kiosterud
mvpearl omitthisword at verizon period net
-------------------------------------------

"Esrei" wrote in message
...
Range("A2:D2").Select
Selection.Copy
Sheets("Sheet2").Select
Selection.PasteSpecial Paste:=xlAll,
Operation:=xlNone, SkipBlanks:=False _
, Transpose:=True
Sheets("Sheet1").Select
Range("A2" xlDropDown)
If Cells (row_index, "A").Value <
End Sub

I know I need a bid more experience but learning as I go.
I want to copy lines to a sheet, transposed, and print.
Then the macro must go to the next line and do this again
and stop at the last line.



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
Playing a macro from another workbook Jim Excel Discussion (Misc queries) 1 February 23rd 05 10:12 PM
automatic macro update boconnell Excel Worksheet Functions 4 February 9th 05 07:10 PM
Date macro Hiking Excel Discussion (Misc queries) 9 February 3rd 05 12:40 AM
Help with macro formula and variable Huge project Excel Worksheet Functions 0 December 28th 04 01:27 AM
Macro and If Statement SATB Excel Discussion (Misc queries) 2 December 3rd 04 04:46 PM


All times are GMT +1. The time now is 07:01 PM.

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

About Us

"It's about Microsoft Excel"