View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Karthi Ganesh Karthi Ganesh is offline
external usenet poster
 
Posts: 7
Default Little help with filter Please please!

Did you check that there are sufficient rows below the last row of your data?
It may be one reason.

"James8309" wrote:

On Jun 16, 4:50 pm, kg_singapore
wrote:
Where do you want the results to be placed,

one row below
or
one column right

In your code, you are trying place next row. Pl chk this

regards
KarthiGanesh



"James8309" wrote:
Hi,


I am trying to do an advance filter in VBA. I do not understand why it
is creating a "reference error" I am just trying to paste the unique
advanced filter result to the very last row + 1 on column A. Can
anyone help? Thanks alot!


Sub Testing()


Dim LR as Integer
Dim LR1 as Integer
Dim Range123 as Range


LR = Range("A65000").End(xlUp).Row
LR1 = LR + 1


Set Range123 = Sheets("Sheet1").Range("A2:A" & LR)
Range123.AdvancedFilter Action:=xlFilterCopy, CopyToRange:=("A" &
LR1 _
), Unique:=True


End Sub


Regards


Jay- Hide quoted text -


- Show quoted text -


One row below the Last row. Why is it keep returning "Reference
error"?

Can you help?

Thx