Solved

How to create a button in Excel

Posted on 2014-01-20
3
281 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
  • 2
3 Comments
 

Author Comment

by:brasiman
Comment Utility
Sorry, forgot to attach the spredsheet. :)
Example.xlsx
0
 
LVL 80

Accepted Solution

by:
byundt earned 500 total points
Comment Utility
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
Comment Utility
Thanks byundt! That worked perfect. Thanks!!!
0

Featured Post

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

Introduction This Article briefly covers methods of calculating the NPV and IRR variants in Excel as well as the limitations in calculating and interpreting IRR results. Paraphrasing Richard Shockley, author of my favourite finance reference tex…
Introduction While answering a recent question (http:/Q_27311462.html), I created an alternative function to the Excel Concatenate() function that you might find useful.  I tested several solutions and share the results in this article as well as t…
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…
The viewer will learn how to create a normally distributed random variable in Excel, use a normal distribution to simulate the return on an investment over a period of years, Create a Monte Carlo simulation using a normal random variable, and calcul…

771 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

Need Help in Real-Time?

Connect with top rated Experts

7 Experts available now in Live!

Get 1:1 Help Now