• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 336
  • Last Modified:

How to create a button in Excel

I have attached a spreadsheet and tried to explain what I am trying to do. Basically, on Sheet 1, I have 3 options. I will click on one of those 3 options. Depending on which one i click on, it takes both values I put on Sheet1, then puts it on Sheet 2, does some math, then returns a total back on Sheet1. After looking at this, I hope its clear to you. :) I am guessing its a macro, i tried a few things but couldn't figure it out. Thanks!!!
0
brasiman
Asked:
brasiman
  • 2
1 Solution
 
brasimanAuthor Commented:
Sorry, forgot to attach the spredsheet. :)
Example.xlsx
0
 
byundtCommented:
I'm not sure that a command button with macro is the best way to do what you want.

I put three option buttons (from Forms toolbar) to let the user choose the amount of race experience. It seems to be a mutually exclusive choice, which is what option buttons do. I linked the option buttons to cell E6 (shaded gray with gray font color to hide the value). If you want to reset the option buttons, just clear the value in cell E6.

I then revised the formulas on Sheet2 so they wouldn't produce an error if cell E6 was blank. A typical formula (for cell G6) is:
=IF(Sheet1!E6="","",CHOOSE(Sheet1!E6,C5,C6,C7))
ExampleQ28343519.xlsm
0
 
brasimanAuthor Commented:
Thanks byundt! That worked perfect. Thanks!!!
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now