I need A4:Q40 and x4:x40 , cells Y4, c154 to c166 I need all the cell I listed to clear all content when I hit the button.You can create a button to run any VBA procedure that you create.
All you have to do is create your VBA procedure, and then assign that procedure to a command button (see How To Add A Form Control Button To Run Your VBA Code | How To Excel).
As for creating the VBA code, if you need help with that, you will need to provide a lot more details than you have!
Sub MyClearCells()
Range("A4:Q40").ClearContents
Range("X4:X40").ClearContents
Range("Y4").ClearContents
Range("C154:C166").ClearContents
End Sub
Thanks it worksPretty straightforward procedure.
If you need to make changes to it, it should be pretty easy to see how to do that.VBA Code:Sub MyClearCells() Range("A4:Q40").ClearContents Range("X4:X40").ClearContents Range("Y4").ClearContents Range("C154:C166").ClearContents End Sub