test forumla rather than result

  • Thread starter Thread starter Ruthki
  • Start date Start date
R

Ruthki

I would like to write a forumla that looks at the formula in a cell
(rather than the value the cell returns. - how do test the forumla
rather than the result.

example

one cell might have a forumula starting off

=right(a1,5)

another cell might have

= mid(a4,2,3)

I would like to write another if formula that does something if the
cell contains the word right in the formula and something else if it
contains mid.
 
Hi Ruthki,

You could create a named formula using XLM function GET.CELL() as follows:

1) select the cell [B1] on your sheet
2) go to menu Insert>Name>Define...
3) in the 'Names in workbook' box of the dialog write: Formula
4) in the 'Refers to:' box write: =GET.CELL(6,!A1)
5) press 'Add' button and then 'OK'

Now find the cell whose formula you want to evaluate and introduce the
following formula in the cell immediately to the right:
=Formula

Note: although I personally have never experienced any problems with XLM
functions, some people report that they may occasionally cause Excel crash
loosing all unsaved data.

Regards,
KL
 
Hi,
Something you might want to try....
Use a find and replace to change the first part of the formulas from "=" to
" =." (Put a space in front.)
The formulas then become text and you can test them.
You can always find and replace to change them back.
Just a thought.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top