View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.misc
Bob Phillips Bob Phillips is offline
external usenet poster
 
Posts: 10,593
Default Need someone to help tweak a code

I already included that in the version I posted Julia.

--
---
HTH

Bob


(there's no email, no snail mail, but somewhere should be gmail in my addy)



"JB" wrote in message
...
Thanks Bob, I just need a little more help (I don't know how to check the
bounds :( )
Sorry to ask, but can you help?

Julia

"Bob Phillips" wrote:

Works for me with a formula, but you may want to do some bound checks

Private Sub Worksheet_Change(ByVal Target As Range)
places = _
Array("J3", "n3", "r3", "v3", "z3", "ad3", "ah3", "al3", "ap3", "at3",
"ax3", _
"bb3", "bf3", "bj3", "bn3", "br3", "bv3", "bz3", "cd3", "ch3",
"cl3",
_
"cp3", "ct3", "cx3", "db3", "df3", "dj3", "dn3", "dr3", "dv3",
"dz3",
_
"ed3", "eh3", "el3", "ep3", "et3", "ex3", "fb3", "ff3", "fj3",
"fn3",
_
"fr3", "fv3", "fz3", "gd3", "gh3", "gl3", "gp3", "gt3", "gx3",
"hb3",
"hf3", "hj3")
If Intersect(Target, Range("a2")) Is Nothing Then
Exit Sub
End If
If i = LBound(places) And i <= UBound(places) Then
i = Range("a2").Value
Range(places(i - 1)).Select
End If
End Sub



--
---
HTH

Bob


(there's no email, no snail mail, but somewhere should be gmail in my
addy)



"JB" wrote in message
...
I have the code below that jumps to another cell based on the data
entered
in
A2, but i need to tweak it so that it allows the data in A2 to be the
result
of a formula and still jump to the specified cell based on the A2
results.

Private Sub Worksheet_Change(ByVal Target As Range)
places =
Array("J3","n3","r3","v3","z3","ad3","ah3","al3"," ap3","at3","ax3","bb3","bf3","bj3","bn3","br3","bv 3","bz3","cd3","ch3","cl3","cp3","ct3","cx3","db3" ,"df3","dj3","dn3","dr3","dv3","dz3","ed3","eh3"," el3","ep3","et3","ex3","fb3","ff3","fj3","fn3","fr 3","fv3","fz3","gd3","gh3","gl3","gp3","gt3","gx3" ,"hb3","hf3","hj3")
If Intersect(Target, Range("a2")) Is Nothing Then
Exit Sub
End If
i = Range("a2").Value
Range(places(i - 1)).Select
End Sub

Thanks in advance!
Julia