Test cell formulas

S

Steven

I have a sheet that is testing amounts from different sheets. It is linking
to different sheets where the amounts should be the same and then in the
controlfile.xls I test the value from the link to see if they are equal. I
have about 100 tests to be perfomed. The thing is it is too difficult to
tell if the links are pulling from different cells as they should or if the
user accidentally used the same reference in their compairison. For Example
in ControlFile.xls

Cell B10: =File01.xls!G30
Cell B11: =File04.xls!D10

In cell B10 I see 250.00 and in cell B11 I see 250.00 and the comparison in
Cell C11: B10-B11 results in -0- which is good. But how do I know for sure
the user did not actually use the same formula in B10 and B11. There are too
many review the formulas manually.

Thank you,

Steven
 
S

Shane Devenshire

Hi,

I believe the only solution would require a macro, but we would need to know
exactly where each of the pairs of cells are located to be able to help with
the code.

Here is same code
Sub TestFormulas()

If ActiveCell.Formula <> ActiveCell.Offset(1, 0).Formula Then
ActiveCell.Interior.ColorIndex = 22
End If

End Sub
 
S

Steven

Shane,

Thanks for the reply. I was thinking about that and ideally I would like
for the formula to be visible on the report. I am currently thinking the
only way to do what I want is to use Indirect() and have the body of the
formula in a cell.

Thank you,

Steven
 

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

Top