Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
AndyE
 
Posts: n/a
Default Searching TEXT in formulae, rather than results of formulae

Is there any way to use the "=RIGHT" or "=LEFT" functions to search the text
that makes up a formula, rather than the result of the formula?

I have a list of formulae that reference a sequence of cells, and I need to
check that the sequence isn't broken (I'm going to ask it to check that each
cell reference is one away from the previous reference, and return an error
message if it isn't).

Thanks!
  #2   Report Post  
Niek Otten
 
Posts: n/a
Default

You can use this UDF:

Function ShowFormula(a As Range)
If Application.ReferenceStyle = xlR1C1 _
Then ShowFormula = a.FormulaR1C1 _
Else: ShowFormula = a.Formula
End Function

You may benefit from (temporarily) choosing R1C1 reference style
(ToolsOptions, General tab). If for example you always reference the row
above or the column to the left, the formulas are the same and exeptions are
easily detected.

--
Kind regards,

Niek Otten

Microsoft MVP - Excel

"AndyE" wrote in message
...
Is there any way to use the "=RIGHT" or "=LEFT" functions to search the
text
that makes up a formula, rather than the result of the formula?

I have a list of formulae that reference a sequence of cells, and I need
to
check that the sequence isn't broken (I'm going to ask it to check that
each
cell reference is one away from the previous reference, and return an
error
message if it isn't).

Thanks!



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
Formulas dealing with text data Bagia Excel Worksheet Functions 6 June 20th 05 10:29 PM
searching a cell for a contained text word Doug K Charts and Charting in Excel 0 June 20th 05 09:10 PM
help searching text Nikko Excel Discussion (Misc queries) 2 April 28th 05 03:32 PM
Searching for text in cells Matt Excel Discussion (Misc queries) 1 January 31st 05 04:16 AM
in excel how to display results of a function and text in the sam. ez123 Excel Worksheet Functions 3 November 19th 04 02:16 PM


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

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

About Us

"It's about Microsoft Excel"