+ Reply to Thread
Results 1 to 9 of 9

How to clear content based on value?

  1. #1
    Forum Contributor
    Join Date
    03-04-2015
    Location
    Jakarta
    MS-Off Ver
    15
    Posts
    154

    Lightbulb How to clear content based on value?

    Please, help me to clear content on cell C1 if A1 is empty and clear content C2 if A2 is empty, et seq.

  2. #2
    Forum Contributor
    Join Date
    01-18-2013
    Location
    Prague
    MS-Off Ver
    Excel 2013
    Posts
    159

    Re: How to clear content based on value?

    try this:

    Please Login or Register  to view this content.

  3. #3
    Valued Forum Contributor
    Join Date
    01-03-2016
    Location
    Conwy, Wales
    MS-Off Ver
    2016
    Posts
    974

    Re: How to clear content based on value?

    if you want VBA to look at all rows where there is a value in columnC.
    Run macro from the worksheet that you want to amend.

    Please Login or Register  to view this content.
    If a response has helped then please consider rating it by clicking on *Add Reputation below the post
    When your issue has been resolved don't forget to mark the thread SOLVED (click Thread Tools at top of thread)

  4. #4
    Valued Forum Contributor
    Join Date
    01-03-2016
    Location
    Conwy, Wales
    MS-Off Ver
    2016
    Posts
    974

    Re: How to clear content based on value?

    or another way
    Please Login or Register  to view this content.

  5. #5
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: How to clear content based on value?

    One more:

    Please Login or Register  to view this content.

  6. #6
    Valued Forum Contributor
    Join Date
    01-03-2016
    Location
    Conwy, Wales
    MS-Off Ver
    2016
    Posts
    974

    Re: How to clear content based on value?

    @JOHN H. DAVIS - elegant code.
    But it will not clear contents in ColumnC if there are values in columnC below the last row with values in columnA.

  7. #7
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: How to clear content based on value?

    @Kevin# - this will:

    Sub putritersenyumz()
    Range("A1:A" & Range("C" & Rows.Count).End(3).row).SpecialCells(4).Offset(, 2).ClearContents
    End Sub

  8. #8
    Forum Contributor
    Join Date
    03-04-2015
    Location
    Jakarta
    MS-Off Ver
    15
    Posts
    154

    Re: How to clear content based on value?

    @igormigor, @Kevin# & @JOHN H. DAVIS
    Thanks so much. Your codes work for me. For JOHN H. DAVIS & Kevin# your codes are what I want.

  9. #9
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: How to clear content based on value?

    You're welcome. Glad to help out and thanks for the feedback and the reps.

+ 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. [SOLVED] Clear content referencing another cell's same content
    By papusale in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 09-08-2015, 05:21 AM
  2. Clear cell content based on calculated value in another cell
    By DVP2010 in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 10-02-2014, 11:13 AM
  3. Replies: 3
    Last Post: 08-16-2014, 09:55 AM
  4. 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
  5. How to clear content up to row 2?
    By simplyfocus in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-14-2012, 02:17 PM
  6. Clear content based on date?
    By Ltat42a in forum Excel General
    Replies: 3
    Last Post: 04-06-2012, 08:19 AM
  7. 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

Tags for this Thread

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