Consulting

Results 1 to 3 of 3

Thread: User Form - Get data from worksheet

  1. #1
    VBAX Tutor phendrena's Avatar
    Joined
    Oct 2008
    Location
    Huddersfield, UK
    Posts
    285
    Location

    User Form - Get data from worksheet

    Hello,

    Is it possible to create a user form that will search for data entered into (that is on a worksheet) it and then display this information on the user form (table formatted)? Would any be able to provide and suggestions on how best to do this.

    Let me explain a little more.....

    The userform will search based on the following criteria :-

    Dealer Number, Dealer Name, Month, Scheme

    The results of this search will then be displayed on the userform in a listbox.
    Assuming that any of the search criteria is left blank then the the user form will search and include all the data in the appropriate column on the worksheet - for example, if the user leaves the Month field blank then the user form will return results for all months.

    Can this be done?

    Thanks,
    Last edited by phendrena; 10-29-2008 at 09:26 AM.
    Somewhere in the dark and nasty regions where nobody goes, stands an ancient castle.
    Deep within this dank and uninviting place lives Berk, overworked servant of The Thing Upstairs.
    But thats nothing compared to the horrors that lurk beneath The Trap Door.

  2. #2
    Administrator
    VP-Knowledge Base
    VBAX Grand Master mdmackillop's Avatar
    Joined
    May 2004
    Location
    Scotland
    Posts
    14,489
    Location
    Can this be done?
    So the Dealer number appears against each Month? or only once with a lot of blanks? I'm not clear what result you are after.
    Can you post some sample data with your userform in a workbook with clarification?
    MVP (Excel 2008-2010)

    Post a workbook with sample data and layout if you want a quicker solution.


    To help indent your macros try Smart Indent

    Please remember to mark threads 'Solved'

  3. #3
    VBAX Tutor phendrena's Avatar
    Joined
    Oct 2008
    Location
    Huddersfield, UK
    Posts
    285
    Location
    Hi,

    The data can be found on the ComplaintsLog worksheet.
    The search form that I am working on is frmMIData.
    The data is entered using the form frmComplaintsLog.

    The search form is supposed to be a quick and easy way for a user to view limited mi data. So the user enters the search criteria and the listbox is then populated with the results.

    All the search criteria can appear multiple times in the worksheet. What I want the listbox to do is to show the amount of times we have had a call based on the criteria. So if search criteria was dealer name (Watermill for example) and they called 17 times (5 in March, 5 in May, 7 in October) then the results would show a total amount called in the listbox.

    Example :
    Search Criteria...

    Dealer Number = 132AA

    Listbox would show :

    Month | Dealer Number | Dealer Name | Total Calls
    5     | 132AA         | Watermill   | 2
    8     | 132AA         | Watermill   | 5
    If the search critera was Dealer Number & Month then the listbox could
    show (Dealer No 132AA, Month August) :

    Month | Dealer Number | Dealer Name | Total Calls
    8     | 132AA         | Watermill   | 5
    I hope that helps give you an idea of what i'm looking to do.

    Thanks,
    Somewhere in the dark and nasty regions where nobody goes, stands an ancient castle.
    Deep within this dank and uninviting place lives Berk, overworked servant of The Thing Upstairs.
    But thats nothing compared to the horrors that lurk beneath The Trap Door.

Posting Permissions

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