+ Reply to Thread
Results 1 to 4 of 4

Macro to clear cell content if cell on the same row is modified based on a drop down list

  1. #1
    Registered User
    Join Date
    01-11-2014
    Location
    Dubai, UAE
    MS-Off Ver
    Excel 2010
    Posts
    46

    Macro to clear cell content if cell on the same row is modified based on a drop down list

    Hi,


    I created a worksheet being filled in manually by users everyday. It has 5 columns. Column A is manually keyed in (date). Column B3:B200 is populated based on a dropdown list. Column C is formula which we can ignore in this discussion. Column D3:D:200 is populated based on a dropdown list INDIRECT to column B and likewise Column E3:E200 is populated based on a dropdown list INDIRECT to column D.

    My problem now is, assuming the 5 columns is populated. If the user modifies any cell in Column B, data in columns D and E will remain and most of the time, it is not related to the INDIRECT list in column B and C, respectively. I can delete the full data in D3:E200 but it will be inefficient because the data may be valid for the next day.

    Can anyone help me with a macro so that, if any cells in column B3:B200 is modified, the respective column D and E on the same row should be cleared.

    Example, B3 = ABC, D3=1 and E3=2. if B3 is modified, say the user pull down the list and select CBA, the contents of D3 and E3 should be cleared and let the user populate with the new data.

    Please help.

    Thanks.

  2. #2
    Forum Expert
    Join Date
    11-28-2012
    Location
    Guatemala
    MS-Off Ver
    Excel 2010
    Posts
    2,394

    Re: Macro to clear cell content if cell on the same row is modified based on a drop down l

    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    01-11-2014
    Location
    Dubai, UAE
    MS-Off Ver
    Excel 2010
    Posts
    46

    Re: Macro to clear cell content if cell on the same row is modified based on a drop down l

    Hi rcm, thank you for the very quick response. I tested the code but then if I select column B, column D&E is immediately cleared. the clearing of Column D&E should be when the user modifies the entry in column B, not when the cell is selected only.

    I believe we're almost there, it's just a simple tweak on the code.

    awaiting for the code.... alner

  4. #4
    Forum Expert
    Join Date
    11-28-2012
    Location
    Guatemala
    MS-Off Ver
    Excel 2010
    Posts
    2,394

    Re: Macro to clear cell content if cell on the same row is modified based on a drop down l

    Please Login or Register  to view this content.
    My bad. Now it should only work if its modified!!!

+ 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. Clear cell content based on another cell calculation
    By zozo23 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 12-21-2012, 03:10 PM
  2. Clear cell range on multiple sheets if cell on one sheet is modified.
    By bjg1016 in forum Excel Programming / VBA / Macros
    Replies: 15
    Last Post: 11-12-2012, 02:39 PM
  3. Replies: 2
    Last Post: 09-03-2012, 02:56 PM
  4. Lock and clear cell content based on another cell's value
    By mohitmahajanin in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-23-2008, 06:30 AM
  5. Replies: 6
    Last Post: 12-05-2005, 08:30 PM

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