Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Accessing Excel Formula


All,

If I have an excel formula in a worksheet (such has vlookup(x,y,z).
I can get the formula using *F = cells(i,j).formula *

Is there and easy way to get x,y,z from F?

Regards

Phil:confused

--
incjour

-----------------------------------------------------------------------
incjourn's Profile: http://www.excelforum.com/member.php...nfo&userid=721
View this thread: http://www.excelforum.com/showthread.php?threadid=49513

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Accessing Excel Formula

If they were all ranges, you could look at DirectPrecedents

but to parse out the arguments:

Sub GetArgs()
Range("A1").Formula = "=Vlookup(""Dog"",Sheet2!A1:C200,3,False)"
sstr = Range("A1").Formula
sstr = Replace(sstr, "(", ",")
sstr = Replace(sstr, ")", "")
v = Split(sstr, ",")
For i = LBound(v) To UBound(v)
Debug.Print i, v(i)
Next
End Sub


Produces
0 =VLOOKUP
1 "Dog"
2 Sheet2!A1:C200
3 3
4 FALSE

--
Regards,
Tom Ogilvy


"incjourn" wrote in
message ...

All,

If I have an excel formula in a worksheet (such has vlookup(x,y,z).
I can get the formula using *F = cells(i,j).formula *

Is there and easy way to get x,y,z from F?

Regards

Phil


--
incjourn


------------------------------------------------------------------------
incjourn's Profile:

http://www.excelforum.com/member.php...fo&userid=7213
View this thread: http://www.excelforum.com/showthread...hreadid=495138



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
Using a Wildcard (*) in formula accessing sheets in workbook. pwk Excel Worksheet Functions 1 February 4th 07 06:47 PM
how do i prohibit user's from accessing formulas (lock the formula scott Excel Programming 1 September 13th 05 11:52 PM
Accessing Excel from VB Wayne Ware Excel Programming 2 May 3rd 05 03:59 PM
Accessing Outlook from Excel Chaplain Doug Excel Programming 6 December 21st 04 09:10 PM
Accessing Word from Excel pikus Excel Programming 4 January 14th 04 07:41 PM


All times are GMT +1. The time now is 12:45 PM.

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"