?
Solved

How to create a button in Excel

Posted on 2014-01-20
3
Medium Priority
?
332 Views
Last Modified: 2014-01-20
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
Comment
Question by:brasiman
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 

Author Comment

by:brasiman
ID: 39795595
Sorry, forgot to attach the spredsheet. :)
Example.xlsx
0
 
LVL 81

Accepted Solution

by:
byundt earned 2000 total points
ID: 39795731
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
 

Author Closing Comment

by:brasiman
ID: 39795889
Thanks byundt! That worked perfect. Thanks!!!
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This code takes an Excel list of URL’s and adds a header titled “URL List”. It then searches through all URL’s in column “A”, looking for duplicates. When a duplicate is found, it is moved to the top of the list. The duplicate URL’s are then highlig…
Some code to ensure data integrity when using macros within Excel. Also included code that helps secure your data within an Excel workbook.
The viewer will learn how to use a discrete random variable to simulate the return on an investment over a period of years, create a Monte Carlo simulation using the discrete random variable, and create a graph to represent the possible returns over…
This Micro Tutorial will demonstrate in Google Sheets how to use the HYPERLINK function to create live links inside your spreadsheet.

649 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question