Created attachment 199367 [details] Invalid range created using method 2 Looking at attachment 50636 [details] from bug 40438 shows that it has named ranges like this: - name: versao_ - range: $'pdrhe com extensão'.$aa$#ref! (there's no sheet named 'pdrhe com extensão', but there is one named 'PDRHE com Extensão') 1. Let's try to recreate something similar in an empty spreadsheet: - Start a new spreadsheet, - Rename sheet to "PDRHE com Extensão" (without quotes), - Open Sheet -> Named Ranges and Expressions -> Define..., - Enter some name, eg. "test", - The Range is pre-filled, let's just replace the number with "#ref!" so it shows: "$'PDRHE com Extensão'.$A$#ref!" - Press Add. => Nothing happens, no message, nothing. 2. - Let's try adding the original suggested name, which will work: "$'PDRHE com Extensão'.$A$1" - Open Sheet -> Named Ranges and Expressions -> Manage..., - Rewrite the Range to the intended one: "$'PDRHE com Extensão'.$A$#ref!" - Press OK. => This works. If the name isn't allowed (and it isn't, see below): - There should be an error message after the steps in 1., - The steps in 2. shouldn't be allowed, and there should also be an error message, - Something should be done with existing files having invalid ranges, like attachment 50636 [details]. If any part of this is fixed, the rest can be split into a separate bug report. Observed using LO 25.8.0.0.alpha0+ (41ab24cecd6ad74312843f113d2faa13259cdb7d) / Windows. In 3.3.0 the dialogs are different (there's a single dialog for defining and managing names), and when trying steps in 1. and 2., there is an error message: Invalid expression. In 3.5.0.3 the dialogs are similar to the current ones, and the bug is already reproducible.