View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
T. Valko T. Valko is offline
external usenet poster
 
Posts: 15,768
Default Identify external references (in formulas) and color format

UDF? is this User Defined Function?

Yes

If so, where to i go to set this up?


Let's make a slight change:

Function GetFormula(cell_ref As Range) As String
Application.Volatile
GetFormula = cell_ref.Formula
End Function

Open the VBE editor: ALT F11
Open the Project Explorer: CTRL R
Locate your file name in the pane that opens
Select the file name then right click
Select InsertModule

Copy/paste the UDF code into the window that opens
Return to Excel: ALT Q

Then apply the cf.


--
Biff
Microsoft Excel MVP


"Mike C" wrote in message
...
Biff,

Thanks, i think this will work and i have a couple of questions..

UDF? is this User Defined Function? If so, where to i go to set this up?
Thanks. Sorry to ask what is probably a simple question..if this is a
macro
how would i set it up (as i am not familiar with Macros). If it is
something
else can you let me know?

I appreciate you answering my post and i think this will work, just need a
little help getting it set up.
--
Mike


"T. Valko" wrote:

Try this:

Create this UDF:

Function GetFormula(cell_ref As Range) As String
GetFormula = cell_ref.Formula
End Function

Then, the conditional format would use the Formula Is option.

Suppose cell A1 contains this formula:

=SUM('C:\TV\[test1.xls]Sheet1'!$A$1:$A$5)

Select cell A1
Goto FormatConditional Formatting
Formula Is:

=AND(LEFT(getformula(A1))="=",SEARCH(".xls",getfor mula(A1)))

Click the Format button
Select the style(s) desired
OK out

--
Biff
Microsoft Excel MVP


"Mike C" wrote in message
...
Hi,

I have a conditional format which allows me to identify/format all
cells
that have formulas. In this instance it changes the font to Blue so
that
every number that is blue, i know is a formula. I want to take it one
step
further and maybe give the whole cell a color if the formula references
an
external link, while all internal workbook links would just remain blue
font,
the external references in formulas would cause the whole cell to be
colored
(say orange). Any ideas?
--
Mike