Finding the last cell in a range
Get last row with
cRow = Cells(Rows.Count,"A").End(xlUp).Row
--
HTH
Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
"Alex" wrote in message
...
I have a few macros that select a range of cells. I
occassionally delete the contents of the RWA Data sheet
and paste in new information that contains the same number
of columns, but the number of rows will always change.
The follwing is an example of some code from one of my
macros. I will always be selecting " 'RWA Data' !R1C1:
but the last row will change. What code can I add that
will look at the last cell in a list that my cursor is in?
Thanks much,
Alex
Range("E14").Select
ActiveWorkbook.PivotCaches.Add(SourceType:=xlDatab ase,
SourceData:= _
"'RWA Data'!R1C1:R3502C19").CreatePivotTable
TableDestination:="", TableName _
:="PivotTable1"
|