G
gjcase
I'm trying to do something simple, but it's not working, any help woul
be appreciated.
I want a macro which will enter a formula into each cell of a tabl
column, for the range from the top of the column thru to the bottom o
the existing table. I have tried recording a macro to do this. Th
macro enters the formula into the first cell, then copies it and paste
to the rest of the column. In order to address the potential that
table may have only one entry, I jump to the bottom of the spreadsheet
then back up to the bottom of the data, then select the range from ther
through the top of the data, less the top cell (so that I don't cop
into the cell above the table when there's just one entry.) Issue i
that I can't get the macro to correctly select the range, it seems t
skip the "step-down" instruction to avoid the top cell when I recor
the macro. See below:
Sub HosedUp()
'
' Macro16 Macro
' Macro recorded 2005-09-02 by G
'
Selection.Copy
ActiveCell.Offset(0, 1).Range("A1").Select
Selection.End(xlDown).Select
ActiveCell.Select
Selection.End(xlDown).Select
Selection.End(xlUp).Select
ActiveCell.Offset(0, -1).Range("A1").Select
Range(Selection, Selection.End(xlUp)).Select
ActiveCell.Offset(-7, 0).Range("A1:A8").Select
ActiveCell.Activate
ActiveSheet.Paste
End Sub
Not sure what I'm doing wrong, but any suggestions would be welcomed.
---Glen
be appreciated.
I want a macro which will enter a formula into each cell of a tabl
column, for the range from the top of the column thru to the bottom o
the existing table. I have tried recording a macro to do this. Th
macro enters the formula into the first cell, then copies it and paste
to the rest of the column. In order to address the potential that
table may have only one entry, I jump to the bottom of the spreadsheet
then back up to the bottom of the data, then select the range from ther
through the top of the data, less the top cell (so that I don't cop
into the cell above the table when there's just one entry.) Issue i
that I can't get the macro to correctly select the range, it seems t
skip the "step-down" instruction to avoid the top cell when I recor
the macro. See below:
Sub HosedUp()
'
' Macro16 Macro
' Macro recorded 2005-09-02 by G
'
Selection.Copy
ActiveCell.Offset(0, 1).Range("A1").Select
Selection.End(xlDown).Select
ActiveCell.Select
Selection.End(xlDown).Select
Selection.End(xlUp).Select
ActiveCell.Offset(0, -1).Range("A1").Select
Range(Selection, Selection.End(xlUp)).Select
ActiveCell.Offset(-7, 0).Range("A1:A8").Select
ActiveCell.Activate
ActiveSheet.Paste
End Sub
Not sure what I'm doing wrong, but any suggestions would be welcomed.
---Glen