We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.

# DateTime from cell with formula is wrong

I have a pretty complex formula in Excel that calculates a date:

=IF(AND(\$AP\$6>BL19;\$AP\$6<BL19+(BM19*30,5));BL19+(BM19*30,5)+\$AS\$6;IF(AND(\$AQ\$6>BL19;\$AQ\$6<BL19+(BM19*30,5));BL19+(BM19*30,5)+\$AQ\$6-BL19;IF(AND(\$AP\$7>BL19;\$AP\$7<BL19+(BM19*30,5));BL19+(BM19*30,5)+\$AS\$7;IF(AND(\$AQ\$7>BL19;\$AQ\$7<BL19+(BM19*30,5));BL19+(BM19*30,5)+\$AQ\$7-BL19;IF(AND(\$AP\$8>BL19;\$AP\$8<BL19+(BM19*30,5));BL19+(BM19*30,5)+\$AS\$8;IF(AND(\$AQ\$8>BL19;\$AQ\$8<BL19+(BM19*30,5));BL19+(BM19*30,5)+\$AQ\$8-BL19;IF(AND(\$AP\$9>BL19;\$AP\$9<BL19+(BM19*30,5));BL19+(BM19*30,5)+\$AS\$9;IF(AND(\$AQ\$9>BL19;\$AQ\$9<BL19+(BM19*30,5));BL19+(BM19*30,5)+\$AQ\$9-BL19;IF(AND(\$AP\$10>BL19;\$AP\$10<BL19+(BM19*30,5));BL19+(BM19*30,5)+\$AS\$10;IF(AND(\$AQ\$10>BL19;\$AQ\$10<BL19+(BM19*30,5));BL19+(BM19*30,5)+\$AQ\$10-BL19;BL19+(BM19*30,5)))))))))))

In Excel the value that's displayed is nothing, the formula calculates to null. But when I read the value in XlsIO it's converted to 31/12/1899. How is this possible? When I go to another row, the formula is parsed correctly. Any advise?

KK Konduru Keerthi Konduru Ravichandra Raju Syncfusion Team November 29, 2022 11:38 AM UTC

Hi Stephane,

As mentioned by you, the formula looks pretty complex. Requesting you to share the Excel document to investigate the query, as the formula has a large number of dependent cells. If you are not happy with sharing the file in public, please mail the file to support@syncfusion.com mentioning the forum ID.

We only use the customer files for testing and will not share or discuss them in any way.

Regards,

Keerthi.