+ Reply to Thread
Results 1 to 3 of 3

Macro to filter a huge dataset

  1. #1
    Registered User
    Join Date
    12-12-2011
    Location
    Norway
    MS-Off Ver
    Excel 2010
    Posts
    2

    Macro to filter a huge dataset

    Hi,

    I am working on our company's accounting code list. In my worksheet I have our accounts in one sheet (with ID, name and so on), and a data extract of our ledger in another sheet. I want to have a link beside each account code that says "example" or "link" (never mind the name), that when pressed reorganizes/filters the data extract in sheet2 so it only shows the lines of information for the specific account. I have included a template excel sheet just to show the basic layout, in case my explanation proves lacking.

    Is there anyone that could point me in the right direction?
    Attached Files Attached Files

  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: Macro to filter a huge dataset

    zilem,

    Attached is a modified version of your example workbook. Each cell that you wanted to be a link, I turned into a hyperlink to Sheet2 cell A1. Then I used a Worksheet_SelectionChange event in the Sheet1 event module to achieve the desired results with the following code:
    Please Login or Register  to view this content.


    Is something like that what you were looking for?
    Attached Files Attached Files
    Hope that helps,
    ~tigeravatar

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

  3. #3
    Registered User
    Join Date
    12-12-2011
    Location
    Norway
    MS-Off Ver
    Excel 2010
    Posts
    2

    Re: Macro to filter a huge dataset

    Quote Originally Posted by tigeravatar View Post
    zilem,

    Attached is a modified version of your example workbook. Each cell that you wanted to be a link, I turned into a hyperlink to Sheet2 cell A1. Then I used a Worksheet_SelectionChange event in the Sheet1 event module to achieve the desired results with the following code:
    Please Login or Register  to view this content.


    Is something like that what you were looking for?
    Wow. That was actually exactly what I was looking for. Such a short and sweet code will definitely replace the monster that I'm using (which still wasn't operating like I wanted it to). Thanks a bunch!

+ 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