+ Reply to Thread
Results 1 to 7 of 7

Seach enitre workbook and display entries Macro

  1. #1
    Registered User
    Join Date
    04-25-2013
    Location
    Gateshead, England
    MS-Off Ver
    Excel 2003
    Posts
    11

    Seach enitre workbook and display entries Macro

    Hi all,

    Apologies for another newbie post. I am learning the wonderful world of VBA and I am hoping for someone to help me with the below code. I found it in an earlier post and I am having trouble with developing it further to fit my needs. I am creating a search tool that allows the user to input a string of Characters, press search and it then displays each entry and its corresponding date contained within the whole workbook containing that string. This is so I can find the dates of when a topic was communicated and the most recent version of this. For example I could post a topic about compliance, then 2 months later an update will come out on the same topic. I would need to be able to search all updates on compliance and the most recent one to show at the top with older entries after. I would also like if possible close matches to load below. I know this is a big ask but if possible then great. I have attached a sample workbook for reference. Any help would be gratefully recieved.

    The code I have started with is as follows: When typing in a topic to search it does not always find it unless I either retype it prior to searching or follow the workaround as mentioned in the post by F2 select all and paste into the search box. So I am hoping someone could help me as time frames are also quite short if honest.

    Thanks in advance as I know I am asking a lot.

    Stuart
    Search Sample2.xls

    Please Login or Register  to view this content.

  2. #2
    Forum Expert tigeravatar's Avatar
    Join Date
    03-25-2011
    Location
    Colorado, USA
    MS-Off Ver
    Excel 2003 - 2013
    Posts
    5,361

    Re: Seach enitre workbook and display entries Macro

    stuartgood24,

    Welcome to the forum!
    Give this a try:
    Please Login or Register  to view this content.
    Last edited by tigeravatar; 04-30-2013 at 01:03 PM.
    Hope that helps,
    ~tigeravatar

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  3. #3
    Forum Expert nilem's Avatar
    Join Date
    10-22-2011
    Location
    Ufa, Russia
    MS-Off Ver
    2013
    Posts
    3,377

    Re: Seach enitre workbook and display entries Macro

    I'm a little late
    Let it be a slightly different version
    Please Login or Register  to view this content.
    Attached Files Attached Files
    Last edited by nilem; 04-30-2013 at 01:11 PM. Reason: found a bug

  4. #4
    Registered User
    Join Date
    04-25-2013
    Location
    Gateshead, England
    MS-Off Ver
    Excel 2003
    Posts
    11

    Re: Seach enitre workbook and display entries Macro

    Thanks to you both Tigaravatr and Nilem!

    Both of these work great! way beyond me!

    Is there any possibility of this also pulling the date through if the cell contains the search string and other characters also? For example Topic 1 would be the search criteria and it would pull all cells with Topic 1 through including say "Topic 1 - update" or would it have to be an exact search?

    Also the dates on the month tabs are hyperlinked to the document that was sent out allowing the user to open the doc from within the workbook. Is there anyway of pulling the hyperlink through also? Just trying to keep the user on one sheet if possible.

    Thanks again for your time already spent on this its really appreciated!

    Stuart

  5. #5
    Forum Expert tigeravatar's Avatar
    Join Date
    03-25-2011
    Location
    Colorado, USA
    MS-Off Ver
    Excel 2003 - 2013
    Posts
    5,361

    Re: Seach enitre workbook and display entries Macro

    Stuart,

    Updated code to preserve hyperlinks and return partial matches. Note that searching for "Topic 1" will find "Topic 1 - update" correctly, and will not find "Topic 11"
    Please Login or Register  to view this content.
    Last edited by tigeravatar; 05-01-2013 at 11:26 AM.

  6. #6
    Registered User
    Join Date
    04-25-2013
    Location
    Gateshead, England
    MS-Off Ver
    Excel 2003
    Posts
    11

    Re: Seach enitre workbook and display entries Macro

    Wow thank you so much! this works a dream! Now comes the fun part of picking it apart to learn what each part does! So much easier when you see it in front of you!

    I will mark the thread as resolved and thanks once again!

    Stuart

  7. #7
    Forum Expert tigeravatar's Avatar
    Join Date
    03-25-2011
    Location
    Colorado, USA
    MS-Off Ver
    Excel 2003 - 2013
    Posts
    5,361

    Re: Seach enitre workbook and display entries Macro

    You're very welcome

+ 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