+ Reply to Thread
Results 1 to 12 of 12

Clear various cells in worksheet when changing related cells

  1. #1
    Registered User
    Join Date
    10-23-2012
    Location
    RSA
    MS-Off Ver
    Excel 2013
    Posts
    6

    Clear various cells in worksheet when changing related cells

    Hi,

    I have created 4 conditional drop down lists on a worksheet. Upon changing a cell in column S, I need the related column T to be cleared. This is to ensure that the user chooses a relevant item from the list in column T once he/she changes column S. The related cells are S15:T15, S19:T19, S20:T20, S21:T21.

    I have used the following code to manage this action for cells S15:T15:
    Please Login or Register  to view this content.
    I have tried various changes to apply to the other cells as well, but have been unsuccessful. Can someone please help me with the correct code?

    Thank you,
    Corneli
    Last edited by Corneli; 10-24-2012 at 04:58 AM.

  2. #2
    Forum Contributor stojko89's Avatar
    Join Date
    05-18-2009
    Location
    Maribor, Slovenia
    MS-Off Ver
    MS Office 365
    Posts
    913

    Re: Clear various cells in worksheet when changing related cells

    Please use CODE tags for inserting a code!

    So if he/she changes say cell S3 then T3 is cleared?
    If he/she changes cell S15 then T15 is cleared?

  3. #3
    Registered User
    Join Date
    10-23-2012
    Location
    RSA
    MS-Off Ver
    Excel 2013
    Posts
    6

    Re: Clear various cells in worksheet when changing related cells

    Sorry, will do.

    That is correct yes

  4. #4
    Forum Contributor stojko89's Avatar
    Join Date
    05-18-2009
    Location
    Maribor, Slovenia
    MS-Off Ver
    MS Office 365
    Posts
    913

    Re: Clear various cells in worksheet when changing related cells

    To Edit the first post click Edit post. Highlight the code and press the # next to <> and you will insert the CODE tags around the code.
    Then hit save.

    Your code:
    Please Login or Register  to view this content.
    This means if the Target column is S (S=19) and if the value of the cell is changed to empty then clear the cell on the right side of it (column 20 = T)

    Hope this helps!

  5. #5
    Registered User
    Join Date
    10-23-2012
    Location
    RSA
    MS-Off Ver
    Excel 2013
    Posts
    6

    Re: Clear various cells in worksheet when changing related cells

    Thanks so much for helping with the code tags. I have changed it in the original post.

    I have tried the code but unfortunately it isn't working. Reason would be that column S never goes empty but gets another value from the drop down list. So the user would choose a different item from the list in column S15 or 19 or 20 or 21 and then column T15 or 19 or 20 or 21 needs to be cleared to force them to choose a new item from the drop down list in column T. The rows are the linked (conditional) cells.

    I hope this explains better. Sorry for not being clear enough first time around.

  6. #6
    Forum Contributor stojko89's Avatar
    Join Date
    05-18-2009
    Location
    Maribor, Slovenia
    MS-Off Ver
    MS Office 365
    Posts
    913

    Re: Clear various cells in worksheet when changing related cells

    Oh...Sory

  7. #7
    Forum Contributor stojko89's Avatar
    Join Date
    05-18-2009
    Location
    Maribor, Slovenia
    MS-Off Ver
    MS Office 365
    Posts
    913

    Re: Clear various cells in worksheet when changing related cells

    Then try this out
    Please Login or Register  to view this content.

  8. #8
    Registered User
    Join Date
    10-23-2012
    Location
    RSA
    MS-Off Ver
    Excel 2013
    Posts
    6

    Re: Clear various cells in worksheet when changing related cells

    No I was not clear enough, so my fault. Please could you still try to help me? Would really appreciate it.

  9. #9
    Forum Contributor stojko89's Avatar
    Join Date
    05-18-2009
    Location
    Maribor, Slovenia
    MS-Off Ver
    MS Office 365
    Posts
    913

    Re: Clear various cells in worksheet when changing related cells

    Quote Originally Posted by stojko89 View Post
    Then try this out
    Please Login or Register  to view this content.
    Try this code I posted in post 7

  10. #10
    Registered User
    Join Date
    10-23-2012
    Location
    RSA
    MS-Off Ver
    Excel 2013
    Posts
    6

    Re: Clear various cells in worksheet when changing related cells

    It works!! Thank you so much!

    I had to make a minor change in the code because it cleared the drop down list in the cell and not only the contents.

    Thanks again for your help - and patience.

  11. #11
    Forum Contributor stojko89's Avatar
    Join Date
    05-18-2009
    Location
    Maribor, Slovenia
    MS-Off Ver
    MS Office 365
    Posts
    913

    Re: Clear various cells in worksheet when changing related cells

    Hey! No problem Thanks for the rep.

  12. #12
    Forum Contributor stojko89's Avatar
    Join Date
    05-18-2009
    Location
    Maribor, Slovenia
    MS-Off Ver
    MS Office 365
    Posts
    913

    Re: Clear various cells in worksheet when changing related cells

    Please mark this thread as [SOLVED].
    You do that by going to your first post and in the upper right corner of the first post you have Thread Tools. Click that and then click Mark this thread as Solved.

    Thanks.

+ 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