FWIW, it seems to me the code could be reduced to:
Code:
With Range("R8")
.Paste
.Formula = "=IF(SUMIF($Q$8:$Q$469,Q8,$P$8:$P$469)=0,"""",SUMIF($Q$8:$Q$469,Q8,$P$8:$P$469))"
.AutoFill Destination:=Range("R8:R469")
End With
Range("R9:R469").Select
As you'll see, you don't need to select cells to work with them. I left the final selection in place, though, as I don't know what you want to do next.