Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Extract parameters passed to a function.

I hope someone can help with this. I think I am just missing a simple trick

I have created a Application_SheetBeforeDoubleClick event in which I would like my code to look at the formula in the cell being double-clicked, then extract the parameters being passed to the function. For example:

Function in cell:- =Left(B1,4

I would like my code to return the parameters 'B1', and '4'. So far I am stripping off the unnecessary text to leave 'B1,4', and then using the SPLIT function to separate the parameters. This works fine for simple functions but for functions where the parameters may have commas in them themselves, this isn't going to work

If anyone can help, I would me most grateful


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 78
Default Extract parameters passed to a function.

After stripping off unnecessary text, replace any brackets
with double quotes, then use text to columns with double
quotes as text delimiters
(I'm not familiar with SPLIT function, I'm using Excel 97)
In Excel 97, use Application.WorksheetFunction.Substitute
function
In Excel 2000 and later, use Replace function

-----Original Message-----
I hope someone can help with this. I think I am just

missing a simple trick!

I have created a Application_SheetBeforeDoubleClick event

in which I would like my code to look at the formula in
the cell being double-clicked, then extract the parameters
being passed to the function. For example:-

Function in cell:- =Left(B1,4)

I would like my code to return the parameters 'B1',

and '4'. So far I am stripping off the unnecessary text
to leave 'B1,4', and then using the SPLIT function to
separate the parameters. This works fine for simple
functions but for functions where the parameters may have
commas in them themselves, this isn't going to work.

If anyone can help, I would me most grateful.


.

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 IF function with Dates as parameters Shaun Excel Worksheet Functions 4 February 13th 06 09:38 PM
Passing parameters Cel Ref) to Sum function Shamshad Butt Excel Discussion (Misc queries) 4 October 26th 05 10:46 AM
MSNStockQuote Function Parameters Bobtarrel Excel Worksheet Functions 2 July 17th 05 02:36 PM
Function Parameters Paddyk Setting up and Configuration of Excel 2 April 12th 05 08:52 AM
Find size of array passed to user-defined function Cliff[_2_] Excel Programming 2 October 21st 03 02:09 AM


All times are GMT +1. The time now is 01:48 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"