+ Reply to Thread
Results 1 to 3 of 3

Attempting to define content in cell based on update of other cell in same row.

  1. #1
    Registered User
    Join Date
    08-08-2007
    Location
    Vancouver
    MS-Off Ver
    Excel 2002, Excel 2007, Excel for Mac 2011
    Posts
    38

    Attempting to define content in cell based on update of other cell in same row.

    I am a newbie at programming. I am trying to modify (clear) the inputs in column C, D, H & J if the input on column A is changed. the following snippet of code works for the first row but does not for subsequent rows.

    Please Login or Register  to view this content.
    I've determined that I need to put a loop and check if "Target" is in a range "column A". I've modified the code to something as below from my research online. From what I read on the internet it should work but I am having no luck. I would appreciate some feedback.

    Please Login or Register  to view this content.
    Thanks in advance
    Yves

  2. #2
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: Attempting to define content in cell based on update of other cell in same row.

    Hello Yves,

    Welcome to the Forum!

    One of the most important things to remember about the Worksheet_Change and Worksheet_SelectionChange events is to disable events whenever yo change the cell's contents or select another cell inside either of the event modules. If you do not disable the events, you can create a cascade event. This happens when the event calls itself over and over until there is no more stack space and Excel crashes. I have this change to your macro.

    Please Login or Register  to view this content.
    Sincerely,
    Leith Ross

    Remember To Do the Following....

    1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.
    2. Thank those who have helped you by clicking the Star below the post.
    3. Please mark your post [SOLVED] if it has been answered satisfactorily.


    Old Scottish Proverb...
    Luathaid gu deanamh maille! (Rushing causes delays!)

  3. #3
    Registered User
    Join Date
    08-08-2007
    Location
    Vancouver
    MS-Off Ver
    Excel 2002, Excel 2007, Excel for Mac 2011
    Posts
    38

    Re: Attempting to define content in cell based on update of other cell in same row.

    Everyone I figured it out by reading a book.

    Please Login or Register  to view this content.

+ 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