I want to put the following formula into a macro, what commands do
use? If Z1=1, goto A1, if z1=100 goto A100.
Can someone help please?
Thank you
--
colinfraser@prosealuk.co
Posted from - http://www.officehelp.i
Bob Phillips - 28 Nov 2006 09:25 GMT
If Range("Z1").Value = 1 Then
Application.Goto Range("A1")
ElseIf Range("Z1").Value = 100 Then
Application.Goto Range("A100")
End If
--
HTH
Bob Phillips
(replace xxxx in the email address with gmail if mailing direct)
> I want to put the following formula into a macro, what commands do I
> use? If Z1=1, goto A1, if z1=100 goto A100.
[quoted text clipped - 8 lines]
>
> Posted from - http://www.officehelp.in
Don Guillett - 28 Nov 2006 13:56 GMT
will this do?
Sub gotocellrefvar()
Application.Goto Range("a" & Range("z1").Value)
End Sub

Signature
Don Guillett
SalesAid Software
dguillett1@austin.rr.com
>
> I want to put the following formula into a macro, what commands do I
> use? If Z1=1, goto A1, if z1=100 goto A100.
> Can someone help please?
> Thank you.