Detect style change (if)?

Wondering if there is a way to detect IF a style is in use in this cell, so something like :

=IF(style=“default”,"",now())
or even;
=IF(STYLE(“default”),2,3)

Obviously this doesn’t work, I’m very new to LibreOffice so; sorry if 'm missing something obvious.

There’s no way to do that iiuc; but why the style changes? using a formula with STYLE spreadsheet function? using a conditional expression? then they must have some conditions, which also possible to test here instead of the style name?

Really? I thought because i can change the style easily enough;

=T(STYLE(IF(A1=“1”,“Default”,“Note”)))

I would be able to detect the style, what about in a macro? I’m no good at Basic, but I’m familiar with JavaScript and understand Calc has the option of adding JS functions as macros…?

As for why Styles; i need to, with 1-2 clicks visually indicate that this cell is ‘done’, i can easily click the sell and the custom ‘done’ style to change its color, i wanted to add a date to this action without adding additional work.

So you used STYLE function, as I supposed. And you have the condition there, which makes “style=“Defailt”” equivalent to easier A1="1" - isn’t that enough?

That was just an example, the cell that I’d like the date in is style-changed manually (to remind me when i do a task), its actually an empty cell, i first wanted a kind of ‘button’ in the cells, but i settled for ‘click cell - double click style’ to indicate that task is done.

Anyway if this can’t be done i will have to find another way; maybe a macro to both change style and add a date linked to a shortcut key…

thanks for your help.