A simple way to do that:
Use this UDF. How to implement a UDF follows.
' ==========================
Function ShowFormula(a As Range)
If Application.ReferenceStyle = xlR1C1 _
Then ShowFormula = a.FormulaR1C1 _
Else: ShowFormula = a.Formula
End Function
' ==========================
================================================
Pasting a User Defined Function (UDF)
Niek Otten, March 31, 2006
If you find a VBA function on the Internet or somebody mails you one, and you don't know how to implement it, follow these
steps:
Select all the text of the function.
CTRL+C (that is, press and hold down the CTRL key, press C, release both). This a shortcut for Copy.
Go to Excel. Press ALT+F11 (same method: press and hold the ALT key, press the F11 key and release both). You are now in the
Visual Basic Editor (VBE).
From the menu bar, choose Insert>Module. There should now be a blank module sheet in front of you. Click in it and then
press CTRL+V (same method.). This a shortcut for Paste. You should now see the text of the function in the Module.
Press ALT+F11 again to return to your Excel worksheet.
You should now be able to use the function as if it were a built-in function of Excel, like =SUM(..)
================================================
--
Kind regards,
Niek Otten
Microsoft MVP - Excel
| Hi Richard,
|
| Your formula will check if the results of the formulas in A1 on both sheets are equal.
| It will not check the whole range and it will not check the formulas. You need VBA for that.
|
| --
| Kind regards,
|
| Niek Otten
| Microsoft MVP - Excel
|
|| OS: XP
|| Excel 2000
||
|| I need to check (2) two different spreadsheets in (2) two different
|| workbooks to see if all the formulas are equal.
||
|| I'm using an IF statement.
||
|| =IF('[Dashboard Kent County.xls]Capacity Violations'!$A$1:$H$31='Capacity
|| Violations'!$A$1:$H$31,"Yes","No")
||
|| Even if I change the formulas the statement still returns Yes.
||
|| Please Help.
||
|| Thanks in Advance
||
|| --
|| Richard
|
|