Results 1 to 3 of 3

Loop to clear cell contents by column (but not entire column)

Threaded View

  1. #3
    Registered User
    Join Date
    11-11-2016
    Location
    Iowa
    MS-Off Ver
    MS Office 2016
    Posts
    14

    Re: Loop to clear cell contents by column (but not entire column)

    Quote Originally Posted by LeoTaxi View Post
    Sub test()
    For x = 1 To Cells(1, Columns.Count).End(xlToLeft).Column
        If Cells(1, x) = "Good" Then Cells(1, x).Resize(3).ClearContents
    Next
    End Sub
    Kind regards
    Leo
    Thanks! I adjusted it a bit to better suit my needs but it works!
    Last edited by codys21; 11-11-2016 at 03:33 PM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Clear contents from all Rows below the last non-empty cell of a column
    By Dan3456 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-05-2016, 09:28 AM
  2. If cell in column contains value, clear contents of another column in the same row
    By Random Thought in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-23-2013, 02:31 PM
  3. [SOLVED] Macro To Clear Cell Contents From Top To Bottom Of A Column
    By kany in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-01-2013, 02:16 AM
  4. [SOLVED] Clear cell contents of duplicates within column
    By davegscott in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 11-12-2012, 06:26 PM
  5. [SOLVED] How to clear cell contents in a certain column based on set criteria
    By macrohelp5 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-25-2012, 10:41 AM
  6. [SOLVED] Macro to clear cell contents in all but 1 column of specified rows
    By HelderPT in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-19-2012, 12:47 PM
  7. Clear Contents of every other cell in one column
    By norolimfrodo in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 12-06-2011, 12:46 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