+ Reply to Thread
Results 1 to 7 of 7

Create macro upon double click cell display filter in new sheet

  1. #1
    Registered User
    Join Date
    08-03-2009
    Location
    KL, Malaysia
    MS-Off Ver
    Excel 2007
    Posts
    18

    Smile Create macro upon double click cell display filter in new sheet

    Hello,

    I have a question regarding creating macros whereas the scenarios as follows:

    Sheet1
    Upon clicking any cell in Sheet1, it will automatically filter based on cell A and B.

    Sheet2
    Automaticall display filtered criteria based on double click from Sheet1

    For example: when I double click on C1, on Sheet2 will automatically diplay filtered data based on A1 and B1 and same thing goes to if I double clik on C2 on Sheet2 will automatically diplay filtered data based on A1 and B2.

    Really need help from the experts here.

    Thank you.filter.png

  2. #2
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,482

    Re: Create macro upon double click cell display filter in new sheet

    Check out this example
    Click the Reset combobox to reset the combobox

    http://www.davesexcel.com/FindDataAndCopy_A.xlsm

    Found here

    http://www.davesexcel.com/apps/blog/...-new-location-
    Last edited by davesexcel; 11-08-2012 at 09:39 AM.

  3. #3
    Registered User
    Join Date
    08-03-2009
    Location
    KL, Malaysia
    MS-Off Ver
    Excel 2007
    Posts
    18

    Re: Create macro upon double click cell display filter in new sheet

    Hi Dave,

    Thanks for the replied which I do really appreciate it. I can see from the example that it integrated the button inside the sheet. From my requirement, instead of using the button and combo box to copy and paste the data, my data already existed in Master Sheet (sheet2) and from sheet1I would be able to double click the correspond cell and auto filter all the data in master sheet (sheet2).

    For example, I double click the cell C1, it will auto read cell A1 and B1 (same goes to the rest of the rows) and auto filter in Master sheet which correspond to the selection in Sheet1.

    Sound easy but I couldn't figure out the exact VBA code.

    Thank you

    project.xlsx

  4. #4
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,482

    Re: Create macro upon double click cell display filter in new sheet

    A1,B1 & C1 are headings in your example, there is nothing to read.

  5. #5
    Registered User
    Join Date
    08-03-2009
    Location
    KL, Malaysia
    MS-Off Ver
    Excel 2007
    Posts
    18

    Re: Create macro upon double click cell display filter in new sheet

    Sorry for the file, it should be for example B2 & A2 and same goes for others. Whereas it will automatically open sheet Master with filter up only all A1 and P1 and etc.... So sorry for the wrong info


    Copy of project.xlsx

  6. #6
    Registered User
    Join Date
    08-03-2009
    Location
    KL, Malaysia
    MS-Off Ver
    Excel 2007
    Posts
    18

    Re: Create macro upon double click cell display filter in new sheet

    Atatched herewith the latest which accomplished.

    Book1f.xlsm

  7. #7
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,482

    Re: Create macro upon double click cell display filter in new sheet

    F1 is a drop down list using Data Validation.
    Select what you want to search for there.

    In a regular module we have
    Please Login or Register  to view this content.
    The worksheet module we have
    Please Login or Register  to view this content.
    Attached Files Attached Files

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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