+ Reply to Thread
Results 1 to 5 of 5

Searching for results in database with certain restrictions

  1. #1
    Registered User
    Join Date
    05-28-2014
    Posts
    5

    Searching for results in database with certain restrictions

    I've got an question about using excel macros to search for information in a database with certain restriction.
    In my attachement u can see an example of the database I use.

    Example.xls

    I've got a database with certain packages, the length and the width of these packages is known.
    I've also got a database with certain products, the length and the width of these products is also known.

    I want to use a macro which allows me to see which packages are useable for a certain product.
    A package is useable if the length/width is less then 10 bigger then the product. So in the example if the width is between 10~20 and the length between 40~50.

    Originally I thought I could use a macro with advanced filter and having restrictions width >10 <20 and length >40 <50. But I can't fit this in as macro because I already get the width and length from the product from another database and macro so it can't say >40 only 40.

    Hope somebody can help me and I made the problem clear.

    Regards,

  2. #2
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Searching for results in database with certain restrictions

    It's good you adding an excel file, so showing us your problem.

    Please also add the desired result in you file.

    Is it also allowed to provide an non VBA solution?
    Notice my main language is not English.

    I appreciate it, if you reply on my solution.

    If you are satisfied with the solution, please mark the question solved.

    You can add reputation by clicking on the star * add reputation.

  3. #3
    Registered User
    Join Date
    05-28-2014
    Posts
    5

    Re: Searching for results in database with certain restrictions

    Thank you for the fast reply, my bad for not adding the wanted result.

    Yes I need a VBA result, since this has to be done over 500 times and I'm not going to do it myselve but someone else is doing it. He also doesn't know much about computers and is typing rather slow so it would take him days.

    I'm also planning on keeping this system so that when new products come he can also give those products a new package.

    Example.xls

    Regards,

  4. #4
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Searching for results in database with certain restrictions

    Here you get an non VBA solution.

    I used helpcolumns to determine the criteria.

    After that filter on criteria yes (the green cell).

    It can be done in 1 formula, but to my opinion there is no need for.

    You can hide the column F and G.

    See the attached file.
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    05-28-2014
    Posts
    5

    Re: Searching for results in database with certain restrictions

    Thanks, from here on I believe I can do it myselve.

    I would just like to ask 2 more questions.
    I asume waar means true in your excel, but the code still says waar in my formulas.
    Is it possible to change the language?

    How do I make a thread solved?

+ 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. Search Through Database And Display Results In Userform without showing database
    By nirvanarapeme in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-04-2012, 05:18 PM
  2. searching database
    By JOOJOHN in forum Excel General
    Replies: 1
    Last Post: 04-25-2010, 01:28 PM
  3. Setting up and searching database
    By smraines in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 12-22-2009, 12:32 AM
  4. Searching a excel database for the 10 best results
    By nick_94_94 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-19-2007, 06:52 PM
  5. Searching Database
    By merritts in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-27-2006, 03:15 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