+ Reply to Thread
Results 1 to 7 of 7

Worksheet Change - need to ignore target cell in results

  1. #1
    Forum Contributor
    Join Date
    06-25-2013
    Location
    Longview, TX
    MS-Off Ver
    MS365
    Posts
    338

    Worksheet Change - need to ignore target cell in results

    Hi! That's probably a kind of confusing title, but I'll try to explain.

    I have a workbook with 19 sheets in it. Twelve of them are for each month of the year and there are 2 others that need to be included in my macro ; "Add Dept" and Import & PJ".
    When a user types a number into a cell in column F of one of the months' sheets, I need the Worksheet Change Event to look in the rest of column F in that sheet, as well as column F in the other monthly sheets and column E in the other 2 sheets. If the number that was just keyed is found in those other ranges, I need a message box to pop up showing all of the other cells that have that number.
    I have a macro that does this, but a message box pops up even if that number isn't located anywhere else and the box shows the cell that the number was just keyed into.
    I need it to not consider the "just keyed in" cell a match.

    Here is the code I have now. I've studied and studied on it and tried changing NUMEROUS things and I can totally break it so it doesn't work at all (LOL!), but I can't make it do what I'm asking.
    Please Login or Register  to view this content.
    Also, if someone could explain to me - in non-tech terms - what each part of the bolded section does, I'd be forever in your debt! (I have an idea what some of the lines mean, but I wouldn't swear to it)

    Thanks

    Jenny
    Last edited by zookeepertx; 11-24-2015 at 05:48 PM.

  2. #2
    Forum Expert
    Join Date
    07-31-2010
    Location
    California
    MS-Off Ver
    Excel 2007
    Posts
    4,070

    Re: Worksheet Change - need to ignore target cell in results

    Please Login or Register  to view this content.
    This should fix your problem

    Please Login or Register  to view this content.
    Last edited by stnkynts; 11-24-2015 at 05:59 PM.
    If you are happy with my response please click the * in the lower left of my post.

  3. #3
    Forum Contributor
    Join Date
    06-25-2013
    Location
    Longview, TX
    MS-Off Ver
    MS365
    Posts
    338

    Re: Worksheet Change - need to ignore target cell in results

    Quote Originally Posted by stnkynts View Post
    Please Login or Register  to view this content.
    This should fix your problem

    Please Login or Register  to view this content.
    Hmmm, sadly, it doesn't. The results still include the Target cell and the macro just keeps thinking and thinking and thinking until I click OK in the message box.

  4. #4
    Forum Expert
    Join Date
    07-31-2010
    Location
    California
    MS-Off Ver
    Excel 2007
    Posts
    4,070

    Re: Worksheet Change - need to ignore target cell in results

    submit your workbook

  5. #5
    Forum Contributor
    Join Date
    06-25-2013
    Location
    Longview, TX
    MS-Off Ver
    MS365
    Posts
    338

    Re: Worksheet Change - need to ignore target cell in results

    Okay, here it is. (On the October sheet, in the cell with the heavy border, I've placed a number that I made sure to scatter through the workbook, just so you'll have a number that will work for sure)
    Attached Files Attached Files

  6. #6
    Forum Expert
    Join Date
    07-31-2010
    Location
    California
    MS-Off Ver
    Excel 2007
    Posts
    4,070

    Re: Worksheet Change - need to ignore target cell in results

    It worked just fine for me when I tested it on your workbook.

  7. #7
    Forum Contributor
    Join Date
    06-25-2013
    Location
    Longview, TX
    MS-Off Ver
    MS365
    Posts
    338

    Re: Worksheet Change - need to ignore target cell in results

    Quote Originally Posted by stnkynts View Post
    It worked just fine for me when I tested it on your workbook.
    I'll have to try it again next week. I'll be sure to come back and let you know how it goes. More than likely, I did something wrong; story of my life!

    Thanks

    Jenny

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. get cell value from worksheet change target
    By vangxbg in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-06-2013, 06:07 PM
  2. Replies: 5
    Last Post: 01-22-2013, 11:38 AM
  3. Worksheet Change: Formula in Target Range
    By rhudgins in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 07-29-2010, 02:46 PM
  4. Worksheet Change Target??
    By spinkung in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-29-2009, 05:33 AM
  5. Change the formula of a target cell in a self-defined worksheet function
    By mxcaocao in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-29-2008, 02:50 PM
  6. [SOLVED] Need to determine the ROW of the TARGET in a Worksheet Change Even
    By Barb Reinhardt in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-04-2006, 09:20 AM
  7. [SOLVED] Excel VBA Target Worksheet change
    By [email protected] in forum Excel General
    Replies: 1
    Last Post: 03-02-2006, 10:40 AM
  8. worksheet change target not recognized
    By Adresmith in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 04-20-2005, 11:03 AM

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