LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 68
Default Help with VBA InStr() function

2003 & 2007


ActiveCell.Formula ='P:\DMB\[MyWorkBook.xls]Allocation '!$U$77*1000000-
_
'P:\DMB\[MyWorkBook.xls]Allocation '!$U$85

Current VBA code to isolate the first cell reference follows:

BeginStr = Left(ActiveCell.Formula, InStr(ActiveCell.Formula, "!") +
1))
CellRefStr = InStr(BeginStr, ActiveCell.Formula, "*")
? CellRefStr yields $U$77 but only if the Operator is "*"

1) How best can I code "*" in the above InStr() so as to substitute it
with ANY
Operator? i.e., Operators = Array("/", "+", "-", "[*]", "",
"<", "=")
2) How then to yield $U$85 ?

Ultimately my End Game is to isolate the each Cell Reference (could be
many!)
after each WorkBook Worksheet reference in the ActiveCell.Formula.

Because there could be many Cell References my initial approach above
may
well be inappropriate or the long way around the barn.

Any help appreciated greatly!

EagleOne

 
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
Use InStr function in formula? Lee Hunter Excel Worksheet Functions 8 May 8th 23 03:45 AM
is there an equal fxn for 'InStr' in excel. Not Find or Search Clausius Excel Worksheet Functions 3 May 1st 23 03:41 AM
Where is the Instr() function in Excel 2003? chem21 Excel Discussion (Misc queries) 3 October 9th 06 03:49 PM
LINKEDRANGE function - a complement to the PULL function (for getting values from a closed workbook) [email protected] Excel Worksheet Functions 0 September 5th 06 03:44 PM
Emulate Index/Match combo function w/ VBA custom function Spencer Hutton Excel Worksheet Functions 2 May 2nd 05 05:26 PM


All times are GMT +1. The time now is 06:15 AM.

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

About Us

"It's about Microsoft Excel"