View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Jim[_31_] Jim[_31_] is offline
external usenet poster
 
Posts: 13
Default Using Variable in RANGE

In a macro I calculate the number of rows and assign it
to 'TOTACS'. I then try and use TOTACS in a Range
statement but it will not let me. How do I go about doing
this? Below is my code:

totacs = dmclastrow + authlastrow

Range("A2").Select

Range("A1:"totacs).AdvancedFilter
Action:=xlFilterCopy, CopyToRange:= _
Columns("G:H"), Unique:=True