+ Reply to Thread
Results 1 to 3 of 3

Formula to clear cells based on another cell value

  1. #1
    Forum Contributor
    Join Date
    12-31-2004
    Posts
    160

    Formula to clear cells based on another cell value

    Hi:

    I would like to have a formula in D2 that would clear the cells in A2:B2 if C2 = "".
    C2 will be counting the differance in the date in A2 and todays date and if it is "" clear the cells in A2:B2.

    Not sure if this can be done with a formula.

    Charles

  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
    Hello Charles,

    Not really sure why you would need a formula in D2. If the values in cells A2 and B2 are controlled by C2. You could place an If statement in each cell to determine what should be displayed.

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

  3. #3
    Forum Contributor
    Join Date
    12-31-2004
    Posts
    160

    Better Explanation

    Quote Originally Posted by Leith Ross
    Hello Charles,

    Not really sure why you would need a formula in D2. If the values in cells A2 and B2 are controlled by C2. You could place an If statement in each cell to determine what should be displayed.

    For Example
    Please Login or Register  to view this content.
    Sincerely,
    Leith Ross
    Ok I don't think I explained the problem well enough.

    First cells A2 and B2 will be typed in and changed often so formula's cannot reside there else the typing will overwrite them.

    A2 will contain a date I will be useing A2:A100 and B2:100 or as far down as I need.

    C2:C100 will need to return 90 when the date is entered and count down 1 each day when the current date changes which will reside in J1=Today() until the cell reaches "".

    Then I need the contents of A2 and B2 to clear out.
    I thought I would need another formula in D2 to do this or I can use a sub place in workbook activate that would check each cell in C2:C100 and if it finds "" clear the contents of the two cells to the left then continue until it loops throught the entire range of column C.

    I'm not sure how to code either the formula or the sub.
    I appreciate your help on this.

    Charles

+ 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