ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Help Writing A Macro in Excel (https://www.excelbanter.com/excel-programming/412511-help-writing-macro-excel.html)

[email protected]

Help Writing A Macro in Excel
 
I am tring to write a Macro in Excel 2002 that will Copy info from 7 rows and
then past in the next 7 rows but I want the the 7 rows to change depending on
the date. How do I do this?

This is what I did but if I rerun the macro it will contine to selet the row
4-10

Sheets("Total").Select
ActiveWindow.SmallScroll Down:=-12
Rows("4:10").Select
Selection.Copy
Range("A11").Select
ActiveSheet.Paste

JLGWhiz

Help Writing A Macro in Excel
 
Try this:
Sub CpyRows()
Sheets("Total").Rows("4:10").Copy Range("A11")
End Sub

" wrote:

I am tring to write a Macro in Excel 2002 that will Copy info from 7 rows and
then past in the next 7 rows but I want the the 7 rows to change depending on
the date. How do I do this?

This is what I did but if I rerun the macro it will contine to selet the row
4-10

Sheets("Total").Select
ActiveWindow.SmallScroll Down:=-12
Rows("4:10").Select
Selection.Copy
Range("A11").Select
ActiveSheet.Paste


JLGWhiz

Help Writing A Macro in Excel
 
You will have to define what you mean by "change depending on the date".
Turn purple? Bold Font? Different rows? Make faces? <g

" wrote:

I am tring to write a Macro in Excel 2002 that will Copy info from 7 rows and
then past in the next 7 rows but I want the the 7 rows to change depending on
the date. How do I do this?

This is what I did but if I rerun the macro it will contine to selet the row
4-10

Sheets("Total").Select
ActiveWindow.SmallScroll Down:=-12
Rows("4:10").Select
Selection.Copy
Range("A11").Select
ActiveSheet.Paste



All times are GMT +1. The time now is 03:02 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com