View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
alex alex is offline
external usenet poster
 
Posts: 25
Default Finding the last cell in a range

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"