Creating a button or macro that multiplies two cells and displays the answer. (School Assignment)

bellakim00

New Member
Joined
Aug 12, 2020
Messages
3
Office Version
  1. 365
Platform
  1. Windows
Hey,
So I have a school assignment where we had to create something in excel and I created a timesheet. For one part, I am calculating the sub-total (multiplying rate by the hours worked), and originally I just added a formula in the formula bar so it did it automatically however my teacher would like me to create a button that, when pressed, displays what the sub total is.
I was wondering if anyone would be able to help me with this? I've attached an image of my document.
Essentially, I just need a button that multiplies two cells and displays the answer, if possible?
Thank you!
 

Excel Facts

VLOOKUP to Left?
Use =VLOOKUP(A2,CHOOSE({1,2},$Z$1:$Z$99,$Y$1:$Y$99),2,False) to lookup Y values to left of Z values.
Sorry here's the image
 

Attachments

  • Image.png
    Image.png
    44 KB · Views: 54
Upvote 0
A very simple way of you doing what you want is to record a macro. Go to your developer tab and press record macro. You then need to perform the multiplication and stop the recorder. Once you have your macro you can insert a shape (button) and assign the macro to it so when you press it, it then performs the action you've just recorded.

Does that make sense?
 
Upvote 0
A very simple way of you doing what you want is to record a macro. Go to your developer tab and press record macro. You then need to perform the multiplication and stop the recorder. Once you have your macro you can insert a shape (button) and assign the macro to it so when you press it, it then performs the action you've just recorded.

Does that make sense?
Yeah that sounds great thanks
 
Upvote 0

Forum statistics

Threads
1,214,805
Messages
6,121,664
Members
449,045
Latest member
Marcus05

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top