+ Reply to Thread
Results 1 to 12 of 12

populate "skip" labels in userform with the correct answer

  1. #1
    Forum Contributor
    Join Date
    08-08-2012
    Location
    englang
    MS-Off Ver
    Excel 2010
    Posts
    152

    populate "skip" labels in userform with the correct answer

    Hi guys,
    maybe somebody can help me, i need to populate "skip" labels in userform with the correct answer.
    After i enter number in the textbox and press "Lookup" button in the userform it will populate labels (starting from "lbl1 to lbl32") with the data.
    Basically what i need is when i type in something in the textbox i would like to activate skip label and then the skip label action would be to count how many bookings were made of that order number in that row and:
    If that order was booked less than 10 times say "NO" in skip label
    If that order was booked from 10 to 14 times say "YES" in skip label
    If that order was booked 15 times say "NO" in skip label
    If that order was booked 16-19 times say "YES" in skip label
    If that order was booked 20 times say "NO" in skip label
    If that order was booked 21-24 times say "YES" in skip label
    If that order was booked 25 times say "NO" in skip label
    Booking data is in the “Update” sheet

    I just can’t figure it out how to do this, i will be very grateful if somebody can help me, I'm so stuck.
    The file is attached for the reference.
    Thanks in advance
    Attached Files Attached Files
    Last edited by intex; 05-19-2014 at 02:38 PM.

  2. #2
    Forum Contributor
    Join Date
    08-08-2012
    Location
    englang
    MS-Off Ver
    Excel 2010
    Posts
    152

    Re: populate "skip" labels in userform with the correct answer

    Maybe some ideas where to start guys.
    Please help

  3. #3
    Forum Expert Tinbendr's Avatar
    Join Date
    06-26-2012
    Location
    USA
    MS-Off Ver
    Office 2010
    Posts
    2,125

    Re: populate "skip" labels in userform with the correct answer

    You're just going to use a search (in vbe search box type range find) in the column for the skip value.

    Sent from my XT1049 using Tapatalk
    David
    (*) Reputation points appreciated.

  4. #4
    Forum Contributor
    Join Date
    08-08-2012
    Location
    englang
    MS-Off Ver
    Excel 2010
    Posts
    152

    Re: populate "skip" labels in userform with the correct answer

    Hi Tinbendr thanks for quick reply,
    but sorry i didn't get you, how search will help me to do what i need, maybe you can give an example because i'm new to vba and i'm only learning.

    Thanks in advance

  5. #5
    Forum Expert Tinbendr's Avatar
    Join Date
    06-26-2012
    Location
    USA
    MS-Off Ver
    Office 2010
    Posts
    2,125

    Re: populate "skip" labels in userform with the correct answer

    to activate skip label and then the skip label action would be to count how many bookings were made of that order number in that row
    I guess I don't understand this. Can you walk through a specific record and show what you expect.

  6. #6
    Forum Contributor
    Join Date
    08-08-2012
    Location
    englang
    MS-Off Ver
    Excel 2010
    Posts
    152

    Re: populate "skip" labels in userform with the correct answer

    Sorry Tinbendr,

    I attached same file with the screenshots so it should be more clear for you what i'm trying to achieve.

    I really appreciate your help,

    Thank You very much
    Attached Files Attached Files
    Last edited by intex; 05-18-2014 at 02:58 PM.

  7. #7
    Forum Expert Tinbendr's Avatar
    Join Date
    06-26-2012
    Location
    USA
    MS-Off Ver
    Office 2010
    Posts
    2,125

    Re: populate "skip" labels in userform with the correct answer

    See if we're close.

    I used the textbox change event instead of the Update button, so the change is immediate.
    Attached Files Attached Files

  8. #8
    Forum Contributor
    Join Date
    08-08-2012
    Location
    englang
    MS-Off Ver
    Excel 2010
    Posts
    152

    Re: populate "skip" labels in userform with the correct answer

    Yes it does exactly what i need, but i doesn't work with rest of the textboxes, how to apply the same for the rest textboxes?

    Thanks you i appreciate your time

  9. #9
    Forum Expert Tinbendr's Avatar
    Join Date
    06-26-2012
    Location
    USA
    MS-Off Ver
    Office 2010
    Posts
    2,125

    Re: populate "skip" labels in userform with the correct answer

    OK, I see the problem.

    You have labels numbered left to right. I assumed top to bottom.

    Try this version.
    Attached Files Attached Files
    Last edited by Tinbendr; 05-18-2014 at 05:45 PM.

  10. #10
    Forum Contributor
    Join Date
    08-08-2012
    Location
    englang
    MS-Off Ver
    Excel 2010
    Posts
    152

    Re: populate "skip" labels in userform with the correct answer

    Hi yes it works thanks for your time maybe you explain me how it works and what you did?

    Thanks
    Last edited by intex; 05-19-2014 at 02:47 AM.

  11. #11
    Forum Expert Tinbendr's Avatar
    Join Date
    06-26-2012
    Location
    USA
    MS-Off Ver
    Office 2010
    Posts
    2,125

    Re: populate "skip" labels in userform with the correct answer

    Since there are eight textboxes, I decided to write a subroutine in Module1 to handle the repetitive tasks. I pass the Order number and the label number to the subroutine. The Sub performs the search counting the number of order numbers. T,hen using the passed label number, updates the corresponding label with the Yes/No value using a Select Case.

  12. #12
    Forum Contributor
    Join Date
    08-08-2012
    Location
    englang
    MS-Off Ver
    Excel 2010
    Posts
    152

    Re: populate "skip" labels in userform with the correct answer

    Thank you very much you are genius, thanks for your hard work

+ 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. Replies: 1
    Last Post: 09-21-2013, 03:18 AM
  2. If formula to return "yes" or "no" answer from a range of cells
    By mfairhurst1 in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 09-02-2013, 05:00 PM
  3. solution for the blank cell using the IF function
    By ragnaedge in forum Excel General
    Replies: 4
    Last Post: 08-23-2013, 11:03 AM
  4. Replies: 2
    Last Post: 06-25-2013, 12:43 PM
  5. Toggle BackColor of labels in Userform through "click" and "double-click"
    By ahmerjaved in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-20-2013, 02:08 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