View Single Post
  #17   Report Post  
Posted to microsoft.public.excel.misc
T. Valko T. Valko is offline
external usenet poster
 
Posts: 15,768
Default Formula vs. Constant

Excellent!

That solves the problem of passing a relative cell ref as Bob noted.

Now I just have to figure out how it works! Not familiar with TEXTREF. I do
have the macrofun help file but I guess I'll have to read it about 10 times
before I understand.

--
Biff
Microsoft Excel MVP


"Lori Miller" wrote in message
...
Instead of the udf =IsFormula(A1), you can enter

=IF(1,IsFormula,A1)

and define the name "IsFormula" to refer to:

=GET.CELL(48,TEXTREF(REPLACE(GET.FORMULA(TEXTREF(" rc")),1,5,"if(")))

It's a bit convoluted but not too flaky :)


"Bob Phillips" wrote:

It works perfectly well in Excel 2003 (11.8316.8221) SP3.

Problem with that approach is that you have to create a defined name to
hold
the GET.CELL function, and you cannot pass a cell reference to a defined
name (well you can, but I find it far too difficult to setup and it is
flaky), you have to hardcode that cell into the formula in the name. This
does provide a little flexibility if you use relative cell addressing but
nowhere near enough that you get with a UDF.

The best way IMO is to wrap it as XLM, although the OP may consider this
as
no more than VBA

GetCell
=ARGUMENT("Ref",8)
=ARGUMENT("Type",1)
=RETURN(GET.CELL(Type,Ref))
=RETURN()

and call like

=GetCell(A1,48)

HTH

Bob


"Joe User" <joeu2004 wrote in message
...
"T. Valko" wrote:
You can use the Excel macro function GET.CELL.

Does not seem to work in my version of Excel 2003 (SP3).

Is that an XL2007-ism?


----- original message -----

"T. Valko" wrote in message
...
You can use the Excel macro function GET.CELL.

See this:

http://groups.google.com/group/micro...cf859ecd?tvc=2

--
Biff
Microsoft Excel MVP


"Joe User" <joeu2004 wrote in message
...
"T. Valko" wrote:
i need a function so i can use it in a formula setting.

You can do this without VBA code but it depends on how you
intend to use it/do it.

Biff, regardless of RK's answer, could you explain what you have in
mind, for my edification.


----- original message -----

"T. Valko" wrote in message
...
thanks but i need a function so i can use it in a formula setting.

You can do this without VBA code but it depends on how you intend to
use it/do it.

Do you want to identify cells that contain formulas and highlight
them
with conditional formatting? Or, some other use?

Need more details.

--
Biff
Microsoft Excel MVP


"rk0909" wrote in message
...
thanks but i need a function so i can use it in a formula setting.
regards,
RK

"FSt1" wrote:

hi
you might consider the goto function.
press F5. click the special button bottom right.
check formula then ok. excel will high light all formulas.
you can do the same with constrants.

regards
FSt1

"rk0909" wrote:

Is there a way using excel funtions (not UDF) to find if a cell
contains a
formula vs. a number (constant).
I looked around the forum but did not find anything. I tried
using
cell
function and left function but they return the value in the
formula
itself.
Any help is appreciated.
Regards,
RK








.