Google Sheets doesn't have a built-in function that directly returns something to tell us if a cell is merged or not. Perhaps the closer function is CELL(info_type, reference) with the first parameter specifying the type of information that should be returned. Unfortunately it doesn't include an "info_type" for merged/un-merged.
On the other hand, it's a fact that a merged cell can't "store" any value/formula which in some cases could be helpful to figure out if a cell is merged or not.
Let see the following case:

- On Column
A
a series of consecutive numbers was written
- Cells
A3
and A4
were merged
- On
B1
there is a formula : =ArrayFormula (A:A)
- Please note that
B4
is empty.
On the above case we could use ISBLANK
to know if a cell is merged. Replacing the above formula on B1
by =ArrayFormula(ISBLANK(A:A))
we get FALSE
for the cells having a value and TRUE
for the cells not having a value.
NOTE: If we replace the values of Column A
by an array formula like =ArrayFormula(ROW(A:A))
the new formula on B1
will return TRUE for A4
. Please note that the value is not stored on A4
. An array of values is stored on A1
and displayed on A:A
.

This isn't exactly what the OP is looking for but in some use cases something like this could be helpful.