View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Sam Wilson Sam Wilson is offline
external usenet poster
 
Posts: 523
Default R/T error 1004 - But WHY?

Replace:

"=Counta(Selection.Offset(-1).end(xlUp) & "":"" & Selection.Offset(-1))"

with

"=Counta(" & Selection.Offset(-1).end(xlUp).address & ":" &
Selection.Offset(-1).address & ")"

Sam

"JMay" wrote:

ActiveCell.Formula = "=Counta(Selection.Offset(-1).end(xlUp) & "":"" &
Selection.Offset(-1))" 'Top to bottom