Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
I have a formula returning a numerical # (like 25). I want to copy and paste
a range from Column A4 to Column GXX) Using that # number as the quantity of rows that I have go to down. Also the data is going to be selected from another sheet, using that variable range specified in the sheet that the data is going to be pasted. |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
With no validity checks...
Option Explicit Sub testme01() Dim LastRowToPrint As Long 'what worksheet and cell holds that number LastRowToPrint = Worksheets("sheet1").Range("x99").Value 'what's the worksheet to print? Worksheets("sheet2").Range("A4:G" & LastRowToPrint).PrintOut preview:=True 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 And I used preview:=true to save some trees while testing. IK wrote: I have a formula returning a numerical # (like 25). I want to copy and paste a range from Column A4 to Column GXX) Using that # number as the quantity of rows that I have go to down. Also the data is going to be selected from another sheet, using that variable range specified in the sheet that the data is going to be pasted. -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
how do I freeze colums & rows without the windows button? | Excel Discussion (Misc queries) | |||
How do change rows to colums AND columns to rows | Excel Discussion (Misc queries) | |||
Print few rows with many colums so that rows wrap on printed pages | Excel Discussion (Misc queries) | |||
i want my excel colums to be rows | Excel Worksheet Functions | |||
switch colums and rows | New Users to Excel |