the go to formula

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

i need help with a formula that will move the curcer to a certain.
example

if cell B2=05b1000,then go to cell A7
if cell B2=05b1001,then go to cell A15
if cell B2=05b1002,then go to cell A21 and so on and so on.

is this posible
 
Sub servient()
s = Array("05b1000", "05b1001", "05b1002")
v = Range("B2").Value
If v = s(0) Then Range("A7").Select
If v = s(1) Then Range("A15").Select
If v = s(2) Then Range("21").Select
End Sub
 
Gary''s Student said:
Sub servient()
s = Array("05b1000", "05b1001", "05b1002")
v = Range("B2").Value
If v = s(0) Then Range("A7").Select
If v = s(1) Then Range("A15").Select
If v = s(2) Then Range("21").Select
End Sub
 
just a typo:
If v = s(2) Then Range("A21").Select


Gary Keramidas
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top