Thread
:
Using variable for range address
View Single Post
#
3
Posted to microsoft.public.excel.programming
Ardus Petus
external usenet poster
Posts: 718
Using variable for range address
Dim Ant as String
Ant="H9"
if range(Ant).value="N" then
HTH
--
AP
"dr chuck" a écrit dans le message de
news:
...
If Range("h9").Value = "N" Then
Selection.AutoFilter Field:=1, Criteria1:="+"
End If
I want to be able to replace "h9" with a variable that i can change
frequently. (ie h9, j12,or whatever cell address i want to use).
I have tried ....
Dim Ant string
Ant = "h9"
If Range("Ant").Value = "N" Then
Selection.AutoFilter Field:=1, Criteria1:="+"
End If
This however does not work. I am not sure of the proper syntax to achieve
this goal.
Thanks in advance--
dr chuck
Reply With Quote
Ardus Petus
View Public Profile
Find all posts by Ardus Petus