D
Dennis
Good Morning.
Using Office 2003
I am trying to:
1) Locate the last cell imported data.
2) Copy a formula in G2 for all G cells to the end of data (G1 contains field names)
To get the last cell of data, I used Edit>GoTo>Special>Last Cell
In the code below, I attempted to insert the value of the last cell into a
Range("G1:xxxxx).Select to do a paste of G2.formula.
My attempt did not work.
I am sure there is a better way.
Help please! TIA
Dennis
Sub FindLastCell() ' Partial code below
[OK] Selection.SpecialCells(xlCellTypeLastCell).Select
[Bad] Range("G3:" & Selection.SpecialCells(xlCellTypeLastCell).Select).Select
End Sub
Using Office 2003
I am trying to:
1) Locate the last cell imported data.
2) Copy a formula in G2 for all G cells to the end of data (G1 contains field names)
To get the last cell of data, I used Edit>GoTo>Special>Last Cell
In the code below, I attempted to insert the value of the last cell into a
Range("G1:xxxxx).Select to do a paste of G2.formula.
My attempt did not work.
I am sure there is a better way.
Help please! TIA
Dennis
Sub FindLastCell() ' Partial code below
[OK] Selection.SpecialCells(xlCellTypeLastCell).Select
[Bad] Range("G3:" & Selection.SpecialCells(xlCellTypeLastCell).Select).Select
End Sub