+ Reply to Thread
Results 1 to 7 of 7

Private sub worksheet change, run when two seperate cells change

  1. #1
    Registered User
    Join Date
    03-14-2010
    Location
    Melbourne, Australia
    MS-Off Ver
    Excel 2010
    Posts
    31

    Private sub worksheet change, run when two seperate cells change

    Hi,

    I've attached a file with a macro that I've built (with the help of excel forum). I've reached a point where I'm stuck and can't get it to work. I have a worksheet change event that runs once cell C4 is changed by the user but I also need it to change when C6 is changed. The macro pulls rows of data that contain the criteria entered by the user from the 'Raw data' tab. I'm sure it's something small I've missed but I can't figure it out. Thanks in advance.

    Cheers
    Attached Files Attached Files
    Last edited by jtd84; 07-11-2012 at 06:47 PM.

  2. #2
    Forum Expert Bob Phillips's Avatar
    Join Date
    09-03-2005
    Location
    Wessex
    MS-Off Ver
    Office 2003, 2010, 2013, 2016, 365
    Posts
    3,284

    Re: Private sub worksheet change, run when two seperate cells change

    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    03-14-2010
    Location
    Melbourne, Australia
    MS-Off Ver
    Excel 2010
    Posts
    31

    Re: Private sub worksheet change, run when two seperate cells change

    Hi Bob,

    I tried using that code but it didn't work. When I change the dropdown in C4 it works fine and the correct data is brought back. When I change the dropdown in C6, nothing happens. Ideally I want the macro to look in column A of 'Raw Data' for the value of C4 and look in column B of 'Raw Data' for the value of C6. If either of C4 or C6 is changed then the macro should bring in new data. At the moment it's only working when C4 is changed, not C6. I tried to duplicate the worksheet change event but I don't think you can do that.

    Thanks

  4. #4
    Forum Expert Bob Phillips's Avatar
    Join Date
    09-03-2005
    Location
    Wessex
    MS-Off Ver
    Office 2003, 2010, 2013, 2016, 365
    Posts
    3,284

    Re: Private sub worksheet change, run when two seperate cells change

    I have no idea about the data, so cannot test, but try this

    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    03-14-2010
    Location
    Melbourne, Australia
    MS-Off Ver
    Excel 2010
    Posts
    31

    Re: Private sub worksheet change, run when two seperate cells change

    Hi Bob,

    I've tried using your code above with no luck, I'm still having the same issue mentioned previously. I've attached a workbook with the code you wrote, are you able to have a look to see what the error is? It seems like it's almost there and just needs a tweak.

    Thanks
    Attached Files Attached Files

  6. #6
    Forum Expert Bob Phillips's Avatar
    Join Date
    09-03-2005
    Location
    Wessex
    MS-Off Ver
    Office 2003, 2010, 2013, 2016, 365
    Posts
    3,284

    Re: Private sub worksheet change, run when two seperate cells change

    I think I was being a bit slow here

    Please Login or Register  to view this content.

  7. #7
    Registered User
    Join Date
    03-14-2010
    Location
    Melbourne, Australia
    MS-Off Ver
    Excel 2010
    Posts
    31

    Re: Private sub worksheet change, run when two seperate cells change

    thanks mate, works perfect. Appreciate the help!

+ 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