Macro to delete cell contents

Need help to create a macro in Libreoffice Calc

I have a list in a spreadsheet with 8 Rows and 5 columns on the end of each row have another column with button in cell the button is to delete cell contents.

I record a macro but after running it found not exactly what I want.

The list is from B4:F11.

Want to delete B6:C6 cell contests I click on G6 button the macro first get the row number then delete the cells contents of B6:C6. All the other buttons must refer to the same macro except refer

difference rows.

Can some one help to complete this

Thank you

Ola @Lumaja1 , segue sugestão, instrução de uso no arquivo.

Hi @Lumaja1 , here’s a suggestion, instructions for use in the file.

Lumaja1_en.ods (16,3,KB)

Lumaja1_en2.ods (16,6,KB)

Showing what the macro should do.
Screenshot from 2025-01-30 17-00-57