View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Don Guillett Don Guillett is offline
external usenet poster
 
Posts: 10,124
Default Newbie question defining ranges


use range("a" & i) or
cells(1,i)
--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"ElPresidente" wrote in message
...
For i = 1 To 17
Set uRange = Sheet1.Range(Cells(1, i), Cells(19, i))
uRange.AdvancedFilter Action:=xlFilterCopy,
CopyToRange:=Sheet3.Cells(1, i), Unique:=True
Next i

Can someone explain why this code works if I write it as above, but if
I change the CopyToRange to Sheet3.Range(Cells(1,i)) I just get
errors?