Solved

How to create a button in Excel

Posted on 2014-01-20
3
320 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 500 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Some code to ensure data integrity when using macros within Excel. Also included code that helps secure your data within an Excel workbook.
When you see single cell contains number and text, and you have to get any date out of it seems like cracking our heads.
The viewer will learn how to create two correlated normally distributed random variables in Excel, use a normal distribution to simulate the return on different levels of investment in each of the two funds over a period of ten years, and, create a …
This Micro Tutorial demonstrate the bugs in Microsoft Excel for Mac with Pivot Charts.

726 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