A family of Microsoft spreadsheet software with tools for analyzing, charting, and communicating data.
Activate the Developer tab of the ribbon.
(If you don't see it: select File > Options > Customize Ribbon. Tick the check box labeled Developer in the list of Main Tabs on the right, then click OK)
Click on Insert in the Controls group of the Developer tab of the ribbon.
Click on Command Button under Form Controls.
Click on the worksheet where you want to insert the button. Excel will display the Assign Macro dialog.
Type a new name for the macro, or leave it as proposed by Excel, then click New.
Excel will activate the Visual Basic Editor, and show the first and last line of the macro:
Make it look like this:
Sub Button2_Click()
Worksheets("Sheet2").Range("G6").Value = "Ricardo"
End Sub
Switch back to Excel and save the workbook as a macro-enabled workbook (.xlsm)