+ Reply to Thread
Results 1 to 9 of 9

Can Toggle Buttons control other multiple Toggle Buttons

  1. #1
    Registered User
    Join Date
    01-05-2016
    Location
    Mertztown, PA
    MS-Off Ver
    2016
    Posts
    44

    Can Toggle Buttons control other multiple Toggle Buttons

    Hi, I would like to use toggle buttons for values that are either on or off for several calculations which thanks to the experts on this forum I can technically do now. I noticed however that it would be nice if I could add some more toggle buttons that would control the values of other toggle buttons. I haven't tried it nor do I have clue as to how to start the process so I will describe how I would like the buttons to work here.

    I have a spread sheet that will do calculations based on the value of 32 separate toggle switches. I doesn't matter if none, all, or any combination of selected toggle buttons are true, the spread sheet will just look to see if the value is true and plug along with the calculations. In certain situations I realistically have the need to select certain combinations of toggle switches. Is it possible to just select a single toggle button that will make other toggle buttons' value true or false? So in essence I would select 1 toggle button that would change the value of multiple toggle buttons so that they are all true or false. Then if I select the toggle button again that controls the other multiple toggle buttons, the value of those toggle buttons would flip the value. Then finally if I happen to be controlling a multiple set of buttons with a single toggle button, I would also like to be able to select 1 of the controlled toggle buttons to switch its value and have the toggle button that controls the other multiple toggle buttons to have its value switched as well since in that scenario, I would no longer be utilizing the calculation criteria that the single controlling toggle button is able to control.

  2. #2
    Forum Expert
    Join Date
    08-12-2012
    Location
    Sydney, Australia
    MS-Off Ver
    Excel 2010
    Posts
    5,636

    Re: Can Toggle Buttons control other multiple Toggle Buttons

    if I could add some more toggle buttons that would control the values of other toggle buttons
    yes this can be done, suggest you map out exactly what you want before starting the coding
    as you can either control groups with grouping (select a couple of buttons and right group) or using naming conventions (tgButt1, tgButt2, tgCombo1, tgCombo2, etc ) or combination of both

    which route you take just be consistent so you can follow it through

    Is it possible to just select a single toggle button that will make other toggle buttons' value true or false
    Hhmmmm are you sure you want a toggle button for this task?
    sounds like you want a preset
    if value = true then
    1= true
    2= false
    3 = false
    4 = true
    etc
    else Value = false then opposite to whatever was mentioned before

    maybe small scale an example up first and play around with
    maybe 6 seperate toggles + couple of presets to test proof of concept
    If you are satisfied with the solution(s) provided, please mark your thread as Solved.
    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

  3. #3
    Registered User
    Join Date
    01-05-2016
    Location
    Mertztown, PA
    MS-Off Ver
    2016
    Posts
    44

    Re: Can Toggle Buttons control other multiple Toggle Buttons

    I don't know if a preset is what I want. So to be more specific, I have attached a jpeg to use as an example.NFL Standings.JPG

    The picture shows 1/2 half of the teams in the NFL which is a sports league based in the U.S. and is pretty much the biggest thing going here. Think of it as the World Cup for Americans, and in this particular example we are looking at the American Football Conference (AFC. There is also another conference called the Nation Football Conference (NFC). Each conference is broken down into 4 divisions with 4 teams each. Each year the teams in each division will play each other twice. Also on a rotating basis from year to year each team in a division will play all the teams in another division. For example we will use the hated New England Patriots (I only hate cause they are just so good, and I am a Miami fan). This year they will play Miami, New York Jets, and Buffalo twice. They will also play all the teams from the South Division (Jacksonville, Tennessee, Indianapolis, and Houston).

    For my purposes, I have several pie charts that will show graphical information related to how New England performs against other teams. As it stands now, if I want to know how New England does against the AFC South Division, I would need to select the 4 teams in that division to get the proper charts displayed. If I just had an AFC South button, all of the teams could be selected at once. I then selected say Houston's button, I would like to look at just the 3 other teams in that division.

    I just use New England's schedule as an example, in reality each team has a scenario like this, so a preset would not be a thing I would be looking for.

    BTW, this year in Philly, they drafted a freakin giant from Australia, and looking at his highlights from your version of football has people exited about his potential. He looks like a violent guy, I hope he can learn the NFL game in short order so that he can lay down some punishment.

    I will try some things and load up the file when I get myself in a corner.

  4. #4
    Forum Expert
    Join Date
    08-12-2012
    Location
    Sydney, Australia
    MS-Off Ver
    Excel 2010
    Posts
    5,636

    Re: Can Toggle Buttons control other multiple Toggle Buttons

    i actually did watch NFL in the past, when they did show it on tv anyway (late 90's)
    so not a complete stranger to it

    anyway so your toggles determine which team goes into a pie charts?

    therefore your "preset" = NFC-AFC/division
    press "something" and it selects all these to be true/false
    eg South Division (Jacksonville, Tennessee, Indianapolis, and Houston)

  5. #5
    Registered User
    Join Date
    01-05-2016
    Location
    Mertztown, PA
    MS-Off Ver
    2016
    Posts
    44

    Re: Can Toggle Buttons control other multiple Toggle Buttons

    Hey, I finally got some of my stuff together and loaded it up here. I had to zip it because in its natural state it would be too large. If you unzip it and open the spreadsheet, under the "The Charts" tab, I have a load of pie charts that are directly controlled by the choices selected in the top few rows. As an example, you can select the Primary Team in cell B2, and the Opponent Team in cell F2. The selection of the lower end of the year range can be made in cell I2, and the upper end of the range is in cell M2. The Primary and Opponents team divisions are automatically populated and calculated in the charts, so using a button that controls this is not needed. I do have an array of weeks listed in row 3 and 4. All of the pie chart calculations are contingent on the values contained in row 4. My hope is to have the buttons in row 3 control some of the buttons in row 4 and vise versa. For instance, right off the bat, the charts are including all of the weeks possible, but:
    1. 1I would like to select the "1st Quarter (1-5)" button to make all of the buttons under it change their values to reflect the value of the larger button above it, and
    2. 2Alternatively, I would like to be able to select one button below the larger "1st Quarter (1-5)" button that would change the value of the larger button.

    Thanks for the help, I tried a few VBA statements, but I'm just too ignorant with regards to the programming techniques to be able to pull this off.
    Attached Files Attached Files

  6. #6
    Forum Expert
    Join Date
    08-12-2012
    Location
    Sydney, Australia
    MS-Off Ver
    Excel 2010
    Posts
    5,636

    Re: Can Toggle Buttons control other multiple Toggle Buttons

    wow
    i'm quite impressed your spreadsheet still runs with so many elements to it

    first things first
    i think your array formula is making your whole spreadsheet really slow
    unless you have a specific need to go to 40000 rows...you should cull it well back to make the sheet work faster

    anyways
    i would also suggest you play around with the calculation mode of the spreadsheet to make it "feel" faster

    the code you could possibly use would be something similar to the below (not going to code the whole thing for you but you can see what the code is doing)

    Please Login or Register  to view this content.
    Please Login or Register  to view this content.

  7. #7
    Registered User
    Join Date
    01-05-2016
    Location
    Mertztown, PA
    MS-Off Ver
    2016
    Posts
    44

    Re: Can Toggle Buttons control other multiple Toggle Buttons

    Thanks, I'll give it a whirl. This spreadsheet represents me hacking away at excel since 2002 without any knowledge of what I am actually doing with excel. Luckily for me, I do 3D surface scanning, CAD modeling, and FEA Analysis for an actual living so my computer requires some horsepower to do that sort of thing. On my end, the calculations are noticeable, but they are done within a second or so, so I don't really even notice the update time even though if I started this again, I'm quite sure there would be a smoother path to get the information I would like to see. I went to 40000 because I figure that is around the amount of time I have left in life. If I live long enough to input lines of data to that level, it would be around 50 more years of game data and by that time it is probably time to take a dirt nap anyway. The database will grow every year by 32 *17 lines, and I don't want to do this again if I can help it, although every off season I consistently find new performance parameters that I would like to add or track. I have other spreadsheets that contain individual game stats, stats on game officials, and a little bit on individual player stats that I also use to determine who I think will win, so for each calculation, I could spend an hour looking at all the info before pulling the trigger on a choice for the week.

  8. #8
    Forum Expert rorya's Avatar
    Join Date
    08-13-2008
    Location
    East Sussex, UK
    MS-Off Ver
    365 Ent Monthly Channel / Insiders Beta
    Posts
    8,911

    Re: Can Toggle Buttons control other multiple Toggle Buttons

    FWIW, you don't really need to test the value since you want the controls to mirror each other:

    Please Login or Register  to view this content.
    for example.

  9. #9
    Registered User
    Join Date
    01-05-2016
    Location
    Mertztown, PA
    MS-Off Ver
    2016
    Posts
    44

    Re: Can Toggle Buttons control other multiple Toggle Buttons

    Thanks, I'll take a look at both methods in the next couple of weeks I have left before the season starts on Aug 2.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] how do i make a toggle button change other toggle buttons value to false
    By kevinu in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 05-10-2018, 04:19 PM
  2. [SOLVED] Record caption into a cell for multiple toggle buttons selected
    By GTX1 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-28-2018, 01:40 PM
  3. Multiple toggle buttons = true to trigger event?
    By crowmagnus in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 07-07-2017, 05:00 PM
  4. [SOLVED] quicker way to add multiple toggle buttons
    By kevinu in forum Excel General
    Replies: 6
    Last Post: 05-14-2017, 11:01 AM
  5. Serial number list with Multiple toggle buttons.
    By ixgunxi in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 09-05-2012, 08:02 PM
  6. Toggle Buttons
    By Momo in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-09-2005, 10:06 AM
  7. How do I use Toggle Buttons?
    By fuzzyfreak in forum Excel General
    Replies: 0
    Last Post: 01-21-2005, 01:10 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1