Compare two cells as formatted

I was asked to remove single-line UDF () from the book to make it easier to move the book into a macro-free environment. 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 need fonts, alignment, etc. If that matters, the target environment will be Excel 365. Nothing:

=D3=E3
=EXACT(D3,E3)

Job. Is there a replacement formula for UDF () ??

+4
source share
1 answer

You can try the following:

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

enter image description here

+6
source

Source: https://habr.com/ru/post/1668274/


All Articles