View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Norman Jones Norman Jones is offline
external usenet poster
 
Posts: 5,302
Default My macro won't find the last row !

Hi Roger,

In addition to Chip's response

Change:

. Range("AF" & lr).").borders.LineStyle = xlContinuous


to

.Range("AF" & lr).Borders.LineStyle = xlContinuous

Additionally, the line

. Range("H" & lr).formula="=sum(h1:h" & lr & ")"


will create a crrcular reference. Try, instead:

..Range("H" & lr).Formula = "=sum(h1:h" & lr - 1 & ")"

Incrporating these change, try:


---
Regards,
Norman