COUPNCD/COUPPCD formula problem

I have LO 7.0.4.2 on MX Linux 21.3 (Debian 11 based OS), I’m trying to use COUPNCD/COUPPCD formulas, in one spreadsheet, worked fine, on the other one, gave me 502 Error, spent hours trying to figure out why the difference to no avail, can someone give me a light what I’m doing wrong, checked many times the input cells, and the format are correct, tried to troubleshoot the formula, the input values for the above function are all correct, but the result is Error 502, is there a way to check which argument was giving the error?

ps: as suggested by sokol92, I’ve attached the spreadsheet that I’m having problem with, bond sheet, where the error occurs, in cell K7, I’m trying to use ACCRINT formula with COUPPCD function, gave an error, in cell K8, I used only COUPPCD, gave error too, and in cell K9, I used function COUPDAYS
error.ods (21.6 KB)
with error too. In bond calc sheet, in cell E9, I used the same formula and it’s working fine.

So far, only you see the error. :slightly_smiling_face:
If you upload the file, then the number of viewers will increase, and perhaps someone will find the reason. Also indicate the addresses of cells with correct and incorrect formulas.

So, we study the formula in cell K7. We calculate it in parts and see that the error is given by the following subformula:

=COUPPCD(E7;Q7;F7)

Cell content:
E7: 06/23/2023
Q7: 08/05/1932
F7: 1

Thanks so much, I can’t believe I missed this error, my cell only showed last 2 digits and I thought it was 2032 instead of 1932!!

2-digit dates can be configured in Tools>Options, LibreOffice General>General. There you define a threshold point between centuries.

Offtop. 1932 was not a very suitable investment. :slightly_smiling_face:

1 Like

Thanks for this tip, already made a change to avoid this happening again.

Two-digit-year in date is an extremely bad idea!
As long as they only are actually used for formatted numbers representing dates, they can at least be rectified changing the format. When used in string-represented dates they are absolutely inaccebtable.
Slash-delimited dates are also a very bad idea since the origin often isn’t clear, and people in USA think it’s clever to swap days and months.
Use ISO 8601 YYYY-MM-DD and everything is clear for everybody, and it’s also the only format that can be exported to and imported from text files (csv style) without problems and dangerous ambiguities.

2 Likes

right, learned the hard way, right in front of me and I didn’t see it, lessons learned.

1 Like