Context: I teach a college course, and my exams are partially completed worksheets that the students have to write the formulas to complete (similar to the ModelOff applied problems if you're familiar with those). I have a "scorecard" in the file that compares the output of their formulas to the correct output and gives them points if they match.

My problem is, that for formulas that are dependent on prior inputs being calculated correctly, the scorecard marks the cell as wrong if the formulas is correct but the precedent values are wrong. I don't want this, because I am evaluating the formula, not the result (if that makes sense). It occurred to me, that I might be able to create a custom function that takes the formula as an input and modifies the cell references to ones containing the correct precedents, and then evaluating the formula for the value it returns. I have been able to make it work with formulas that have ranges. Here is a limited example:

Code:

```
Public Function FormulaTest(Cell As Range) As Boolean
Dim CellFormula As Variant
Dim D15Test As Double
Dim Rng As Range
D15Test = Worksheets("Comparison Worksheet").Range("D15").Value
Debug.Print (Cell.Formula)
If InStr(Cell.Formula, ":") <> 0 Then
CellFormula = Replace(Cell.Formula, Cell.Address, "'Comparison Worksheet'!" & Cell.Address)
Debug.Print (CellFormula)
If Evaluate(CellFormula) = D15Test Then
FormulaTest = True
Else
FormulaTest = False
End If
Else
End If
End Function
```

The one caveat, I do not know what the operators in the formula will be in advance, so I cannot use them as delimiters.