+ Reply to Thread
Results 1 to 12 of 12

how to set a result based on a range of responses in a userform??

  1. #1
    Registered User
    Join Date
    08-05-2013
    Location
    NSW Australia
    MS-Off Ver
    Excel 2010
    Posts
    6

    Question how to set a result based on a range of responses in a userform??

    Hello,

    I'm new to excel and have developed a userform by following google steps!!

    I have a form that I want users to answer a series of questions which will give them a group allocation based on the answers they have provided in the form. However, I have no idea how to do this. I have looked at lots of pages and other issues people have posted, but most of it seems to be very different to what I'm after.
    There are 4 possibilities that can result based on 5 questions - I have set them up as yes/no (for 4 questions) and greater than/less than (for 1 question) for ease of calculation.

    I also want a 'site code' auto-generated by the choice that is made in a drop down list.

    The point of this form is to allow diagnostic categories for a study! It doesn't need to be saved, only printed onto an A4 sheet to go in the patient file. I have managed to do this, and done a test print!

    I set up the form to pop up when the 'click here' button is pressed, but I've read on other posts that you can set it just to open to the form. Can someone explain (very simply) how to do this please?!

    Apologies for the 3 requests as it's probably a lot for a first post!

  2. #2
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,259

    Re: how to set a result based on a range of responses in a userform??

    Hello NayB1980,

    welcome to the Forum!

    To expedite a solution, you should post a copy of your workbook. This will allow all code to be tested against the actual data and layout. If your workbook contains sensistive information, please redact it before posting.


    If you can post a copy of the workbook for review, it will help us find a solution faster.

    How To Post Your Workbook
    1. At the bottom right of the Reply window, Click the button Go Advanced
    2. At the top of the Your Message Window, in the first row of icons, Click the Paperclip icon.
    3. Click the Add Files button at the top right in the dialog box. This displays the File Manager dialog.
    4. Click the Select Files button at the bottom middle of the dialog.
    5. In the new window Find the file you want to upload, select it, and Click Open.
    6. You will now be back in the File Manager dialog. Click the bottom Middle button Upload File.
    7. Wait until the file has completely uploaded before you exit the File Manager dialog.

    File Manger Picture


    This code needs to be a VBA Module.
    Sincerely,
    Leith Ross

    Remember To Do the Following....

    1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.
    2. Thank those who have helped you by clicking the Star below the post.
    3. Please mark your post [SOLVED] if it has been answered satisfactorily.


    Old Scottish Proverb...
    Luathaid gu deanamh maille! (Rushing causes delays!)

  3. #3
    Registered User
    Join Date
    08-05-2013
    Location
    NSW Australia
    MS-Off Ver
    Excel 2010
    Posts
    6

    Re: how to set a result based on a range of responses in a userform??

    Apologies for not supplying it in my original thread - I wasn't sure if I should at the first post.

    Upon playing with it a bit more, I've realised that my response options need to be check boxes rather than radio buttons, so I'll need to fix this, but the principle for getting the result on the form will be the same won't it?
    Attached Files Attached Files

  4. #4
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,259

    Re: how to set a result based on a range of responses in a userform??

    Hello NayB1980,

    Where does the "Participant ID" come from? I don't see it anywhere on the UserForm.

  5. #5
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,259

    Re: how to set a result based on a range of responses in a userform??

    Hello NayB1980,

    One other question, which button will log the entries?

  6. #6
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,259

    Re: how to set a result based on a range of responses in a userform??

    Hello NayB1980,

    The UserForm will display when the workbook is opened.
    I corrected the problem with the option buttons not working in pairs.
    The Site List is now dynamic. Just add to the list on the sheet. There are no blank lines in the drop down.
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    08-05-2013
    Location
    NSW Australia
    MS-Off Ver
    Excel 2010
    Posts
    6

    Re: how to set a result based on a range of responses in a userform??

    Quote Originally Posted by Leith Ross View Post
    Hello NayB1980,

    Where does the "Participant ID" come from? I don't see it anywhere on the UserForm.
    Hi Leith, the Participant ID is made up from the screening number & randomisation number that the user types into the form

  8. #8
    Registered User
    Join Date
    08-05-2013
    Location
    NSW Australia
    MS-Off Ver
    Excel 2010
    Posts
    6

    Re: how to set a result based on a range of responses in a userform??

    Quote Originally Posted by Leith Ross View Post
    Hello NayB1980,

    One other question, which button will log the entries?
    Hi Leith,

    I haven't set it to log the entries as the idea is the user will input the data & print the form to be placed in the patient file. The form will be accessible via an online web-page that we have for all of our studies.
    We have to have everything paper-based so I didn't see the point in saving the form because it won't be accessed for checking (hence why I've asked for it to be printed). Or does it need to be logged??
    Last edited by NayB1980; 08-05-2013 at 03:44 AM.

  9. #9
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,259

    Re: how to set a result based on a range of responses in a userform??

    Hello NayB1980,

    Since your workbook has a "Data" worksheet with columns matching the UserForm entries, I thought perhaps you might want to log the entries.

  10. #10
    Registered User
    Join Date
    08-05-2013
    Location
    NSW Australia
    MS-Off Ver
    Excel 2010
    Posts
    6

    Re: how to set a result based on a range of responses in a userform??

    Hi Leith,

    Sorry I did that because the instructions on how to set up the userform told me thats what I neded to do! For what we need this form for, the entries don't need to be logged. So I'm guessing I can delete that sheet?

  11. #11
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,259

    Re: how to set a result based on a range of responses in a userform??

    Hello NayB1980,

    No problem, you can delete the sheet.

  12. #12
    Registered User
    Join Date
    08-05-2013
    Location
    NSW Australia
    MS-Off Ver
    Excel 2010
    Posts
    6

    Re: how to set a result based on a range of responses in a userform??

    Hi, I'm wondering if anyone has had any success in helping me to figure out how to do the calculations?

+ 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] Populate a Listbox in a UserForm based on a Search Result
    By clapforthewolfman in forum Excel Programming / VBA / Macros
    Replies: 29
    Last Post: 07-17-2013, 07:53 PM
  2. [SOLVED] Creating a new tab and filling in one column based on user responses
    By goosetopher in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-26-2013, 07:03 PM
  3. Coding for Pop-up boxes based on responses to Yes/No Radio buttons
    By mkaur313 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-06-2012, 02:33 AM
  4. result to be based upon range of payroll
    By clayrfarris in forum Excel General
    Replies: 2
    Last Post: 12-19-2010, 06:34 PM
  5. Formula based on number of responses
    By sleah in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 05-19-2005, 09:33 AM

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