How to make a "Click Button" to clear cells?

I want to “clear” three cells after the calculation is done. I have no idea of where to start (or how to do it). It is another “learning stage” for me.
Maybe there is another way to clear the cells.
It a basic percentage calculation where you input the %, the total value you want to find the percentage and the results.
I was thinking of a “click button” to clear the display for the next input. Or is there a “better” way?

Any suggestion on what or how to do this (sample)? Thanks ahead for the help.

Percentage Calc.ods (17.1 KB)

I sort of got the “Clear” button to work, but not the way I want to. What happening now is that I have to put the focus on the % cell and click “Clear”, that work.Same as the value cell.
But what I really want is to clear both at the same time and I have been unable to do that.

Can someone point out what I did wrong here? I’m putting a new file up -1. Thanks for any suggestion / help.
Percentage Calc-1.ods (19.8 KB)

This isn’t the best option, but it will work.
To get the answer, double-click anywhere.
Percentage Calc DblClock.ods (16.9 KB)

Thank you for your suggestion, I’ll use this until I figure out to use a “clear” button.
It does work to clear the cells.

How do I set a button to execute a macro in calc?

Macros/Basic/Calc/Ranges - The Document Foundation Wiki #Get_cell_by_name

  sheet = ThisComponent.CurrentController.ActiveSheet
  sheet.getCellRangeByName("B6").value = 0

To get a reusable solution for more than one highly specialised case, and to omit the dependency on the current selection, you need a way to tell a macro doing the job what cells it shall work on. This can’t be done with a recorded macro.
To see in detail what I mean, study the attached example which uses cell styles for the selection.
It contains a written macro using API functionalty in some places. If you want to know how they work, and what ways there are to trigger the execution of such a macro, you may need to come back with some additional questions. (Don’t expect a complete tutorial, however.)
disask_127420_ClearOnDemand.ods (37.0 KB)