+ Reply to Thread
Results 1 to 2 of 2

How do I clear the contents of one cell from another cell?

  1. #1
    RonB
    Guest

    How do I clear the contents of one cell from another cell?

    I would like to clear the contents of a cell in an Excel worksheet from
    another cell in the same worksheet based on the content of that other cell.
    Stating it in words: if cell A2 equals 1 then set cell A1 equal to "blank".
    Is there a simple way to do this? I am using cell A1 for input by the user
    therefore A1 cannot contain an equation.

  2. #2
    David Hepner
    Guest

    RE: How do I clear the contents of one cell from another cell?

    You could use this VBA code:

    Private Sub Worksheet_Change(ByVal Target As Range)
    If Range("A2").Value = 1 Then Range("A1").Value = ""
    End Sub


    "RonB" wrote:

    > I would like to clear the contents of a cell in an Excel worksheet from
    > another cell in the same worksheet based on the content of that other cell.
    > Stating it in words: if cell A2 equals 1 then set cell A1 equal to "blank".
    > Is there a simple way to do this? I am using cell A1 for input by the user
    > therefore A1 cannot contain an equation.


+ 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