View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
arshia22 arshia22 is offline
external usenet poster
 
Posts: 2
Default Excluding a string

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