+ Reply to Thread
Results 1 to 6 of 6

Clear all cells in column based off column header

  1. #1
    Forum Contributor
    Join Date
    12-18-2011
    Location
    long island
    MS-Off Ver
    365
    Posts
    236

    Clear all cells in column based off column header

    Hello,

    I have this code:
    Please Login or Register  to view this content.
    This clears cells under the header "New PO". The problem I have is that this code only clears the first occurrence of "New PO". I need it to clear every occurrence of "New PO" in the range.

  2. #2
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010, 2013
    Posts
    7,775

    Re: Clear all cells in column based off column header

    Try:
    Please Login or Register  to view this content.
    You can say "THANK YOU" for help received by clicking the Star symbol at the bottom left of the helper's post.
    Practice makes perfect. I'm very far from perfect so I'm still practising.

  3. #3
    Forum Contributor
    Join Date
    12-18-2011
    Location
    long island
    MS-Off Ver
    365
    Posts
    236

    Re: Clear all cells in column based off column header

    Hi Mumps1,

    I'm getting a compiler error: Object required on:


    Set sAddr = ""

  4. #4
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010, 2013
    Posts
    7,775

    Re: Clear all cells in column based off column header

    It looks like you have additional code besides the one you posted. It would be easier to help and test possible solutions if you could attach a copy of your file including all the code. Explain in detail what you want to do referring to specific cells, rows, columns and sheets using a few examples from your data (de-sensitized if necessary). See the yellow banner at the top of this page for instructions to attach a file.

  5. #5
    Valued Forum Contributor
    Join Date
    12-01-2011
    Location
    Philippines
    MS-Off Ver
    Excel 2016
    Posts
    949

    Re: Clear all cells in column based off column header

    maybe p = 3 or ClearReqs.Row

    Please Login or Register  to view this content.

  6. #6
    Forum Contributor
    Join Date
    12-18-2011
    Location
    long island
    MS-Off Ver
    365
    Posts
    236

    Re: Clear all cells in column based off column header

    Hi Mumps1,

    Attached is a copy of my workbook. It was not posted originally because it was too large.
    Attached Files Attached Files

+ 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. Sum formula Visible cells only based on Column Header
    By Yadavgiri in forum Excel Formulas & Functions
    Replies: 13
    Last Post: 11-14-2021, 02:52 AM
  2. [SOLVED] Clear Cells in Range Based on Column
    By Oxygen Potassium in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 08-21-2017, 09:54 PM
  3. [SOLVED] Pulling a column header based on a cells lowest value
    By kcgojnur in forum Excel General
    Replies: 21
    Last Post: 08-15-2017, 02:13 AM
  4. How to clear data in particular column keeping Header as it is using VBA
    By Amar321 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-24-2016, 11:07 AM
  5. VBA to clear cells in one column based on another
    By gibsomaa in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-22-2014, 03:20 PM
  6. [SOLVED] Clear all data below header row in specific column
    By ks100 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 01-02-2014, 04:50 PM
  7. How do you clear the label in a column header?
    By susiesc in forum Excel General
    Replies: 8
    Last Post: 03-31-2013, 01:35 PM

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