View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Bob Phillips Bob Phillips is offline
external usenet poster
 
Posts: 10,593
Default Excluding a string

Can you use something like

Application.Goto Reference:=range(activecell.DirectPrecedents.Addre ss)

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"arshia22" wrote in message
ups.com...
Hi all;
I use the following macro to jump from one worksheet to another (based
on the reference cell)

Sub Auto_Open()
' Adds Ctrl G shortcut to workbook
Application.OnKey "^g", "GoToCell"
End Sub
Sub GoToCell()
'
' GoToCell Macro
' Keyboard Shortcut: Ctrl+g
'
'Goes to precedent cell for cell that is activated

On Error Resume Next
Application.Goto Reference:=Mid(ActiveCell.FormulaR1C1, 2)

End Function

but some of the cells that refering to other worksheets' cell, are like
=SUM('sheet4!G:G), and because of SUM, the macro doesnt work. Is there
any way to exclude the string SUM in the macro and then running it.

Thanks
Sean