+ Reply to Thread
Results 1 to 3 of 3

Private sub to delete a cell's contents if another cell's value changes to anything but 4

  1. #1
    Forum Contributor
    Join Date
    01-06-2004
    Posts
    121

    Private sub to delete a cell's contents if another cell's value changes to anything but 4

    Cell C5 uses DATA VALIDATION to select from a list.

    Cell AO5 uses vlookup to come up with a number based on the selection in cell C5 (so if the user selects the first item in the list in cell C5 then the result in AO5 is 1...if the user selects the 4th item in the list the result in AO5 is 4)

    If a user selects ANYTHING but number 4 in the list in cell C5, I want the data in cell H5 to be cleared.

    There is already a private sub running on this sheet and I need to add to it. Here's what the existing looks like:

    Please Login or Register  to view this content.

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

    Re: Private sub to delete a cell's contents if another cell's value changes to anything bu

    Please Login or Register  to view this content.

  3. #3
    Forum Contributor
    Join Date
    01-06-2004
    Posts
    121

    Re: Private sub to delete a cell's contents if another cell's value changes to anything bu

    Thanks stnk

    I tried something similar but it wasn't working. I then realized that the document itself was glitching and that nothing was working. Had to restart the program.

    Doh

+ 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. Delete Rows that contain matching cell contents in column to the contents in cell B1
    By sspatriots in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 01-23-2015, 05:39 PM
  2. [SOLVED] Macro Delete Contents in 23rd corresponding cell if the cell in range is a non-blank cell
    By murtaza.khan in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 03-04-2014, 01:11 AM
  3. Need to delete the contents of a cell every time another cell is updated
    By Rajesg Dutta in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 12-26-2013, 11:41 AM
  4. [SOLVED] Code to delete cell contents IF the result of a formula in the cell = 0
    By jayjaynz in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 01-22-2013, 03:58 AM
  5. Use find and replace to delete contents of cell and cell
    By almilw in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-11-2011, 06:56 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