Id like to create a macro in the calc file

this is what i want to do with the macro
I’m designing a Christmas light display and using a photo of the house in the libreoffice spreadsheet.
when I refer to blocks i’m talking about the blocks in libreoffice calc (spreadsheet).
I wanted to create a macro that will do the following.

when I click a block in the spreadsheet it will turn a certain color of my choosing and a number will appear
the first block I click on will turn the color and the first number will show (1)
and the second block I click will do the same but it will go up 3 numbers so the second will have #4
and the next #7 and so on

When I say block I mean the space between the the vertical and horizontal lines
I use the spreadsheet because the spaces where I want to put a Christmas light bulb would be shaded a color
and the number is the channel for the control system.
I heard this idea from someone on youtube
https://www.youtube.com/watch?v=Q8Adi-b8ksk

Thank You
John

Hi John! My English is probably even worse - I do not quite understand the question. So I want to clarify. Block - is a cell? Background is always yellow? Changing only the number, the color does not change? The last part - about the combination of “press a key on the keyboard” and clicks - I’m sorry, I don’t understand.

I have read a new version of the text of your question, John. I like it - nice idea, funny, interesting. But still don’t understand the word “block”. What’s this? A button? A simple rectangle (shape)? A group of elements? And why did you choose Calc, but not, for example, Draw or Writer? Have you seen something similar to your idea somewhere in the Internet? Perhaps viewing this sample will help us to understand each other.

Nice video. Thus, John, you don’t need this particular macro (you could just ask the author of the video). Finally you need a spreadsheet in which some cells are filled with numbers. And you need a simple way to make the numbers in the cells according to some pattern. Just forget that the pattern definitely need to draw with the mouse by clicking on different blocks. We can come up with an easier way. This is an interesting task. But search for solution will take some time for thinking

Try this variant of macro - Increment yellow cell by click.ods
Set to any cells style AutoIncrement and just click it