+ Reply to Thread
Results 1 to 4 of 4

Sheet 1 button click resulting in random sheet 2 selection

  1. #1
    Registered User
    Join Date
    04-17-2014
    Location
    Aus
    MS-Off Ver
    Excel 2010
    Posts
    2

    Sheet 1 button click resulting in random sheet 2 selection

    Hi All

    This is my first post and I am an extremely novice Excel user, and would be very grateful for some help!
    I think what I need is pretty simple, however I have no clue how to go about it.

    I want to have a group of buttons on sheet 1 of a spreadsheet, that when clicked, will result in an item from a corresponding data set on sheet 2 being displayed. What I need however, is for the selection to be random and repeatable.

    For example: Group 1 is a button option on sheet 1. When I click it, it will display in the results box, one of 20 possible choices in the group 1 data set from sheet 2. And should I click the button again, it will repeat the function and give me another randomly chosen result.

    I have attached a basic sheet here, so If anyone is able to have a quick look, or could instruct me, that would be amazing
    Kind regards,
    Matt.
    Attached Files Attached Files

  2. #2
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,236

    Re: Sheet 1 button click resulting in random sheet 2 selection

    Hi Matt and welcome to the forum,

    I've put some Event code behind the worksheet. When you double click on the "Group" words it will trigger the Event Code and grab a word from your list and put it in Row 2. I hope you can work with something like this.

    See attached.
    Attached Files Attached Files
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

  3. #3
    Registered User
    Join Date
    04-17-2014
    Location
    Aus
    MS-Off Ver
    Excel 2010
    Posts
    2

    Re: Sheet 1 button click resulting in random sheet 2 selection

    MarvinP, this is exactly what I needed! Thank you so much!

    I plan to learn more about this type of coding in Excel. Super useful.

    Again, thank you so much!

  4. #4
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Sheet 1 button click resulting in random sheet 2 selection

    Based on your last post in this thread, its apparent that you are satisfied with the solution(s) you've received and have solved your question, but you haven't marked your thread as "SOLVED". I will do it for you this time.

    In future, to mark your thread as Solved, you can do the following -
    Select Thread Tools-> Mark thread as Solved.

    Incase your issue is not solved, you can undo it as follows -
    Select Thread Tools-> Mark thread as Unsolved.

    Also, since you are relatively new to the forum, i would like to inform you that you can thank those who have helped you by clicking the small star icon located in the lower left corner of the post which helped you. This adds to the reputation of the person who has taken the time to help you.
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

+ 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. How to disable right click on a button in an excel sheet?
    By Swagata in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 11-28-2012, 08:22 AM
  2. Call button click event from a button on anther sheet
    By ajaykgarg in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 03-25-2010, 09:27 AM
  3. click button and print sheet
    By Sonyk in forum Excel - New Users/Basics
    Replies: 4
    Last Post: 08-29-2009, 01:03 PM
  4. click button and send data from one sheet to another
    By Sonyk in forum Excel - New Users/Basics
    Replies: 2
    Last Post: 07-18-2009, 06:10 PM
  5. [SOLVED] Code for opening another sheet on button click
    By pmud in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 05-18-2005, 06:06 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