+ Reply to Thread
Results 1 to 3 of 3

Clear data fom multiple tables

  1. #1
    Registered User
    Join Date
    02-04-2018
    Location
    Canberra, Australia
    MS-Off Ver
    2013
    Posts
    74

    Clear data fom multiple tables

    Hi All,

    I have two tables in one worksheet which I want to clear the data, leaving one row below the headers, before importing/updating the data into the tables.

    I'm using the following code, which works, but would like a more streamlined approached to achieving the same results.


    Please Login or Register  to view this content.
    Any help appreciated

    Cheers

    Dean

  2. #2
    Forum Expert Roel Jongman's Avatar
    Join Date
    03-28-2015
    Location
    Netherlands
    MS-Off Ver
    Office 365
    Posts
    1,483

    Re: Clear data fom multiple tables

    Is this short enough for you?

    not sure if your tables are on a worksheet with codename sheet1 but replace sheet1 with the actual sheetname
    you say there are 2 tables (listobjects) on that sheet in total. so listobjects can be handeled by name or by number.
    listobject(1) and listobjects(2) will be the number id's of your tables, a small loop will discard their databodyrange

    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    02-04-2018
    Location
    Canberra, Australia
    MS-Off Ver
    2013
    Posts
    74

    Re: Clear data fom multiple tables

    Thanks Roel,

    very short and works a treat.

    Cheers

    Dean

+ 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. Macro to clear data from multiple cells on multiple sheets
    By danielleissy in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-26-2018, 08:37 AM
  2. Clear many empty tables of data
    By salmasaied in forum Excel Programming / VBA / Macros
    Replies: 42
    Last Post: 11-22-2016, 06:12 PM
  3. [SOLVED] Clear all filters (tables) on multiple worksheets
    By lucasreece in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-26-2015, 07:30 AM
  4. Clear Pivot Tables
    By rbirch in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-03-2015, 11:35 PM
  5. Replies: 1
    Last Post: 06-21-2013, 04:05 AM
  6. Multiple Data Tables Link and Calculate onto Target Tables
    By billexchry in forum Excel General
    Replies: 6
    Last Post: 03-04-2011, 02:42 PM
  7. pivot tables:clear summary
    By Josie in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 05-24-2006, 03:20 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