Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Macro Help
I am new to Excel Macros, but not to Excel. I want to write a macro that
will copy the VALUES in a row to row A1, then print the range "Print", return to the next row in the worksheet and do it again. When I recorded my macro, it keeps returning to the first row I copied and does not go down to the next row and repeat the action. |
#2
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Macro Help
Maybe something like:
option explicit sub testme01() dim FirstRow as long Dim LastRow as long Dim iRow as long with worksheets("sheet1") firstrow = 2 lastrow = .cells(.rows.count,"A").end(xlup).row for irow = firstrow to lastrow .rows(irow).copy .range("a1").pastespecial paste:=xlpastevalues .range("Print").printout Preview:=true next irow end with end sub Needy Novice wrote: I am new to Excel Macros, but not to Excel. I want to write a macro that will copy the VALUES in a row to row A1, then print the range "Print", return to the next row in the worksheet and do it again. When I recorded my macro, it keeps returning to the first row I copied and does not go down to the next row and repeat the action. -- Dave Peterson |
#3
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Macro Help
You are the best Dave! This worked!! Thanks for your time; I really
appreciate it. "Dave Peterson" wrote: Maybe something like: option explicit sub testme01() dim FirstRow as long Dim LastRow as long Dim iRow as long with worksheets("sheet1") firstrow = 2 lastrow = .cells(.rows.count,"A").end(xlup).row for irow = firstrow to lastrow .rows(irow).copy .range("a1").pastespecial paste:=xlpastevalues .range("Print").printout Preview:=true next irow end with end sub Needy Novice wrote: I am new to Excel Macros, but not to Excel. I want to write a macro that will copy the VALUES in a row to row A1, then print the range "Print", return to the next row in the worksheet and do it again. When I recorded my macro, it keeps returning to the first row I copied and does not go down to the next row and repeat the action. -- Dave Peterson |
#4
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Macro Help
Woohoo!!
Glad it worked for you. Needy Novice wrote: You are the best Dave! This worked!! Thanks for your time; I really appreciate it. "Dave Peterson" wrote: Maybe something like: option explicit sub testme01() dim FirstRow as long Dim LastRow as long Dim iRow as long with worksheets("sheet1") firstrow = 2 lastrow = .cells(.rows.count,"A").end(xlup).row for irow = firstrow to lastrow .rows(irow).copy .range("a1").pastespecial paste:=xlpastevalues .range("Print").printout Preview:=true next irow end with end sub Needy Novice wrote: I am new to Excel Macros, but not to Excel. I want to write a macro that will copy the VALUES in a row to row A1, then print the range "Print", return to the next row in the worksheet and do it again. When I recorded my macro, it keeps returning to the first row I copied and does not go down to the next row and repeat the action. -- Dave Peterson -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Editing a simple macro | Excel Worksheet Functions | |||
Closing File Error | Excel Discussion (Misc queries) | |||
Help with macro looping and color query function | Excel Discussion (Misc queries) | |||
Playing a macro from another workbook | Excel Discussion (Misc queries) | |||
Date macro | Excel Discussion (Misc queries) |