if function not working as expected.

I am using libreoffice as detailed below
Version: 5.3.6.1
Build ID: 5.3.6.1-19.el7
OS Version: Linux 3.10
Locale: en-US (en_US.utf8)
Tools - Options - Libreoffice Calc - Formula - Formula Syntax - Excel A1 (is set)

I have an .ods file with two sheets.
In the sheet1 I enter alphanumeric strings (e.g. AA564321) in the cell A1.

In sheet2 the cell B1 returns content of A1 of sheet1. I have linked sheet1-A1 to sheet2-B1 (by using Paste special - Link option)

In Sheet2, I want the formula entered in B1 to be returned in C1 only if B1 is empty (without linked data in Sheet1-A1), but without the first ten characters.

Sheet2-B1 will be empty if Sheet1-A1 is empty.

For the said purpose, I have this formula in C1 (of sheet2)

=MID(IF(B12="","",FORMULA(B12)),10,4)

The formula works when sheet1-A1 contains data.
But when I delete contents of sheet1-A1, save the file and close it, and reopen it, C1 returns the formula even if the Sheet1-A1 has no value returned by the formula.

What should I do? Any help would be appreciable.

ISBLANK and “equal to empty string” are different conditions :wink: