Highlighting and copying in Excel

Solved/Closed
DannyBoy - Jul 11, 2011 at 02:53 PM
 DannyBoy - Jul 11, 2011 at 04:02 PM
Hello,

I am just starting on visual basic and would like to record a macro whereas, once I have pressed play, Excel will select a cell 12 rows down from where I have selected, copy a range of cells, 8 across and 12 down, highlight this boxed area and then copy it ( I will then paste this into a non-Microsoft program) .

I can write small parts of this but not enough!

All help appreciated!

Dan

2 replies

rizvisa1
Posts
4479
Registration date
Thursday January 28, 2010
Status
Contributor
Last seen
May 5, 2022
769
Jul 11, 2011 at 03:26 PM
Try this
Sub doPrepCopy()

   With Range(ActiveCell, Cells(ActiveCell.Row + 11, ActiveCell.Column + 7))
      .Select
      .Copy
   End With
   
End Sub
0
I have then added

ActiveCell.Offset(12, 0).Select

To get to the next set of 12

Thanks for your help!
0