getoffthehill
New Member
- Joined
- Mar 30, 2010
- Messages
- 12
Hi,
I have a number of visible rows in my worksheet (and a number of hidden rows). I want to copy over the visible rows only. My data will be of varying lenghts.
The problem is, when I run my macro it only selects rows 1 & 2 and stops short of selecting all visible rows.
My Macro looks like the following:
Range("A1:G1").Select
Range(Selection, Selection.End(xlDown)).Select
Range(Selection, Selection.End(xlDown)).Select
Selection.SpecialCells(xlCellTypeVisible).Select
Selection.Copy
Range("A288").Select
ActiveSheet.Paste
When recording the Macro I firstly selected A1 to G1, then held 'Shift' & 'Ctrl' to select all. I had to do this twice to select everything - as doing it once only selected rows 1 & 2. It seems to me that the row in Red above is doing nothing in my Macro, yet it worked when recording the Macro.
I'd appreciate any help.
Thanks.
I have a number of visible rows in my worksheet (and a number of hidden rows). I want to copy over the visible rows only. My data will be of varying lenghts.
The problem is, when I run my macro it only selects rows 1 & 2 and stops short of selecting all visible rows.
My Macro looks like the following:
Range("A1:G1").Select
Range(Selection, Selection.End(xlDown)).Select
Range(Selection, Selection.End(xlDown)).Select
Selection.SpecialCells(xlCellTypeVisible).Select
Selection.Copy
Range("A288").Select
ActiveSheet.Paste
When recording the Macro I firstly selected A1 to G1, then held 'Shift' & 'Ctrl' to select all. I had to do this twice to select everything - as doing it once only selected rows 1 & 2. It seems to me that the row in Red above is doing nothing in my Macro, yet it worked when recording the Macro.
I'd appreciate any help.
Thanks.