+ Reply to Thread
Results 1 to 16 of 16

Movie Database Lookup

  1. #1
    Registered User
    Join Date
    04-13-2009
    Location
    Philippines
    MS-Off Ver
    Excel 2007
    Posts
    94

    Movie Database Lookup

    hello, i need help on making excel code or vba code to make a search function from "search" tab.. and the databases are "movie list1 & movie list2" tab and for further database to add in the near future that would be "movie list3,4,5" tab and so on.. as i dont want to use the Filter function

    How:

    example: i will type in "the" word on the "yellow" cell and all the movie titles that contain the word "the" from my database tabs will show on the "grey" cell downwards..

    Thanks in advance
    Attached Files Attached Files
    Last edited by macky1730; 08-19-2009 at 01:24 AM.

  2. #2
    Forum Guru
    Join Date
    08-26-2007
    Location
    London
    Posts
    4,606

    Re: Movie Database Lookup

    Try this, though you make life more difficult by putting the films on different sheets.
    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    04-13-2009
    Location
    Philippines
    MS-Off Ver
    Excel 2007
    Posts
    94

    Re: Movie Database Lookup

    Hi StephenR

    Thanks for the quick response

    i try to search for "Hulk" but the movie title silver surfer appeared on the list which has no "hulk" word in the whole title. Any suggestions? and by the way how to make command that after i hit enter it will autofill the list? thanks

  4. #4
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Movie Database Lookup

    I added a button to your sheet and put this code into it:
    Please Login or Register  to view this content.
    Last edited by JBeaucaire; 08-18-2009 at 11:18 AM. Reason: Sheet removed...see below for latest version
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  5. #5
    Registered User
    Join Date
    04-13-2009
    Location
    Philippines
    MS-Off Ver
    Excel 2007
    Posts
    94

    Re: Movie Database Lookup

    Hi JBeaucaire

    Thanks, but im i bit lost about the red line.. what should i change? you mean i will rename the tab to cell1, cell2 and so on?

  6. #6
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Movie Database Lookup

    No, I changed that macro and the sample sheet. Just download it again to see the updates.

  7. #7
    Forum Guru
    Join Date
    08-26-2007
    Location
    London
    Posts
    4,606

    Re: Movie Database Lookup

    That's curious because when I type in "hulk" I don't get "silver surfer" ...

  8. #8
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Movie Database Lookup

    Why would you? When you type in Jessica Alba you won't get Silver Surfer, either.

    This is a string search, it finds the string you type in the movie names.

  9. #9
    Registered User
    Join Date
    04-13-2009
    Location
    Philippines
    MS-Off Ver
    Excel 2007
    Posts
    94

    Re: Movie Database Lookup

    Quote Originally Posted by StephenR View Post
    That's curious because when I type in "hulk" I don't get "silver surfer" ...
    it did show on mine, and it executes the filter after i run the userforms in VB.. im not sure if im doing it correctly

  10. #10
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Movie Database Lookup

    There are no userforms or autofilters in this sheet. Here it is again in case you've gotten mixed up.
    Attached Files Attached Files

  11. #11
    Registered User
    Join Date
    04-13-2009
    Location
    Philippines
    MS-Off Ver
    Excel 2007
    Posts
    94

    Re: Movie Database Lookup

    Quote Originally Posted by JBeaucaire View Post
    Why would you? When you type in Jessica Alba you won't get Silver Surfer, either.

    This is a string search, it finds the string you type in the movie names.
    so any suggestion on how to make a good search engine for that format of movie database? I used a .bat file to generate all the movie names with the specified extensions such as .avi, ect. so now im stuck on this lookup thing.. any suggestions?

  12. #12
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Movie Database Lookup

    Quote Originally Posted by macky1730 View Post
    it did show on mine, and it executes the filter after i run the userforms in VB.. im not sure if im doing it correctly
    If you've got a code that finds "Hulk" in the text string:
    "I:\Movies\English Collections\Fantastic Four Rise Of The Silver Surfer\Fantastic Four Rise Of The Silver Surfer.avi"

    ...I've got to SEE that! Hehe.

    If this sample sheet we've been working with is actually completely different from what you're actually working on, why don't we look at the real thing?

  13. #13
    Registered User
    Join Date
    04-13-2009
    Location
    Philippines
    MS-Off Ver
    Excel 2007
    Posts
    94

    Re: Movie Database Lookup

    Quote Originally Posted by JBeaucaire View Post
    There are no userforms or autofilters in this sheet. Here it is again in case you've gotten mixed up.
    strange.. maybe my excel settings does not support buttons?? everytime i hit enter with input text it doesnt show anything

  14. #14
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Movie Database Lookup

    Quote Originally Posted by macky1730 View Post
    so any suggestion on how to make a good search engine for that format of movie database? I used a .bat file to generate all the movie names with the specified extensions such as .avi, ect. so now im stuck on this lookup thing.. any suggestions?
    The code I gave you does exactly what you asked for. It finds the word/string you type in the yellow on all the other sheets and lists the movies with that word/string in the title. Works perfectly.

    Again, if you post a sample sheet that doesn't reflect what you're really doing, we're wasting time. This particular question has been answered particularly.

  15. #15
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Movie Database Lookup

    Quote Originally Posted by macky1730 View Post
    strange.. maybe my excel settings does not support buttons?? everytime i hit enter with input text it doesnt show anything
    This is VBA so if you haven't got macros enabled, you won't see anything.

  16. #16
    Registered User
    Join Date
    04-13-2009
    Location
    Philippines
    MS-Off Ver
    Excel 2007
    Posts
    94

    Re: Movie Database Lookup

    Quote Originally Posted by JBeaucaire View Post
    This is VBA so if you haven't got macros enabled, you won't see anything.
    Thank you

    Its your sheet im working on now.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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