Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
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

  #2   Report Post  
Posted to microsoft.public.excel.programming
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



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Formula percent complete excluding given text string smokief Excel Discussion (Misc queries) 2 August 1st 07 05:54 PM
Importing Long String - String Manipulation (INVRPT) (EDI EANCOM 96a) Brian Excel Programming 3 February 9th 06 03:38 PM
Summing part of a string excluding cells soph Excel Worksheet Functions 2 January 4th 06 01:05 AM
summing part of a string, excluding cells soph Excel Worksheet Functions 1 January 4th 06 12:03 AM
COUNTIF - everything excluding a string sans Excel Worksheet Functions 3 October 6th 05 08:32 PM


All times are GMT +1. The time now is 12:34 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"