Calc: Conditional Format of column (or row) ONLY up to the last input (non empty cell)

I am inputting numbers in a column. Not in every cell, though.

I want to protect the current cell immediately after input (once I press Enter) but ALSO ALL THE EMPTY CELLS ABOVE IT (which have value zero so I left them blank).

I set up a style for this and used the NOT(ISBLANK($A1)) function. It works for the cells where I input.

But for the empty cells above?

Hello, I have tried it the other way round and it works. Format Standard the cells are locked. I have created a template based on Standard and called it “unprotected”. Now a conditional formatting with the formula =ISBLANK(A1) and if true the template is unprotected. This works as desired. After writing such a cell it is protected.

If this answer helped further, then please mark the question as answered.

Best regards

Juergen

Enclosed an example document. For illustration also colored in red and green.

Update! Here is the new sheet. Now it works like expected.
Protect.ods

Sorry, it’s not working. Your file re-creates pretty much the same situation.

Let me be more specific:

Let’s say I enter a value in A1. Once I press Enter, A1 becomes protected.

Then I leave empty A2 and A3 and then I enter a value in A4. When I press Enter in A4 I want A2, A3 and A4 to become protected.

That’s what I meant by “cells above last input”: A2 and A3 above A4

Schöne Grüße !!

I updated my answer with a new sheet!

Hello Wannabe, did you notice that I have renewed the sheet. I’d say your problem is solved. A comment from you and marking the question as answered would be helpful. To mark the question please click on the small hook in the circle.

Yes, it works! Thank you! I am marking the question as answered.

PS: Name’s PopStarWannabe :stuck_out_tongue: