+ Reply to Thread
Results 1 to 7 of 7

Clear table content from column/cell to the end of table

  1. #1
    Forum Contributor
    Join Date
    05-08-2013
    Location
    FLORENCE, ALABAMA
    MS-Off Ver
    Excel 2010
    Posts
    125

    Clear table content from column/cell to the end of table

    Hello Dear Excel Experts,
    Can you help me with creating a macro to clear a table starting from Q16 down and to the right. I want to leave the table header and bottom total row. The table will have different number of rolls at different times.

    For example table:
    Clear contents from Q16 to the bottom of the table and all the columns to the right. Leaving col header and col bottom. In this example all data in the table in yellow Q16 down to Q34 over to AY16 to AY34. The table size will change by more rows being add or deleted each time the file is used.

    Any help will be greatly appreciated!!!
    Attached Files Attached Files

  2. #2
    Valued Forum Contributor
    Join Date
    05-02-2013
    Location
    Poland
    MS-Off Ver
    Excel 2013
    Posts
    361

    Re: Clear table content from column/cell to the end of table

    Is that what this is about?

    Please Login or Register  to view this content.

  3. #3
    Forum Guru bakerman2's Avatar
    Join Date
    10-03-2012
    Location
    Antwerp, Belgium
    MS-Off Ver
    MSO Home and Business 2024
    Posts
    7,522

    Re: Clear table content from column/cell to the end of table

    How about this?
    Please Login or Register  to view this content.
    Avoid using Select, Selection and Activate in your code. Use With ... End With instead.
    You can show your appreciation for those that have helped you by clicking the * at the bottom left of any of their posts.

  4. #4
    Forum Contributor
    Join Date
    05-08-2013
    Location
    FLORENCE, ALABAMA
    MS-Off Ver
    Excel 2010
    Posts
    125

    Re: Clear table content from column/cell to the end of table

    Hi hungt, it cleared the whole table. I need to keep the data in Columns A through P

  5. #5
    Forum Guru bakerman2's Avatar
    Join Date
    10-03-2012
    Location
    Antwerp, Belgium
    MS-Off Ver
    MSO Home and Business 2024
    Posts
    7,522

    Re: Clear table content from column/cell to the end of table

    Did you test my code?

  6. #6
    Forum Contributor
    Join Date
    05-08-2013
    Location
    FLORENCE, ALABAMA
    MS-Off Ver
    Excel 2010
    Posts
    125

    Re: Clear table content from column/cell to the end of table

    Hi bakerman2,
    It worked perfectly.

    Thank you both bakerman2 and hungt for taking the time to help me with this file. You're the best!!

  7. #7
    Forum Guru bakerman2's Avatar
    Join Date
    10-03-2012
    Location
    Antwerp, Belgium
    MS-Off Ver
    MSO Home and Business 2024
    Posts
    7,522

    Re: Clear table content from column/cell to the end of table

    You're welcome and thanks for rep+.

+ 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. Clear Table content and paste new content
    By Undo in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-28-2023, 12:42 PM
  2. Add cell value to dynamic table/sort table/clear contents of previous cell
    By acmichae in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-10-2021, 10:04 PM
  3. Move Table Row from Sheet1 to another Table on Sheet2 based on cell content
    By penticuf in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-06-2021, 08:29 PM
  4. Move data from 1 table to another table, then clear the original table
    By kwoltman in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 04-03-2019, 06:06 PM
  5. Replies: 2
    Last Post: 12-24-2018, 11:27 AM
  6. Replies: 0
    Last Post: 08-18-2017, 03:03 PM
  7. Clear content of all table but one column
    By simonplus in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-17-2017, 12:12 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