4
votes

I have been asked to remove a one-line UDF() from a workbook to facilitate moving the workbook to a macro free environment. The UDF() compares two cells "as formatted":

Public Function fEXACT(r1 As Range, r2 As Range) As Boolean
    fEXACT = (r1.Text = r2.Text)
End Function

enter image description here

I don't care about the font, alignment, etc. If it matters, the target environment will be Excel 365. Neither:

=D3=E3
=EXACT(D3,E3)

work. Is there a formula replacement for the UDF() ??

1

1 Answers

6
votes

You can try this:

=AND(EXACT(D3,E3),CELL("format",D3)=CELL("format",E3))

enter image description here