Results 1 to 3 of 3

Thread: Remove rows above a cell with certain contents?

  1. #1
    Acolyte Charley's Avatar
    Join Date
    Jul 2017
    Posts
    59
    Articles
    0
    Excel Version
    365

    Remove rows above a cell with certain contents?



    Register for a FREE account, and/
    or Log in to avoid these ads!

    I have a government-created workbook with multiple "tables" stacked in a worksheet. The only thing that designates any block of numbers and text as a table is that each one starts with an empty row, has a table title in column A, another empty row, and then column titles followed by typical table contents.

    Is there a way to search for a table's title in a worksheet to discover the number of rows that must be deleted to move the table to row 1? And is there an equivalent way to find the first empty row below the table so that I can delete any content below it?

    Thanks!

  2. #2
    Acolyte Bill Szysz's Avatar
    Join Date
    Apr 2016
    Location
    Poznań, Poland Dublin, Ireland
    Posts
    99
    Articles
    0
    Excel Version
    Excel 365
    Hi Charley,
    Please, provide some example file.
    For now, i think you should be interested Table.RemoveFirstN and Table.FirstN functions.

  3. #3
    Seeker BernardBrussels's Avatar
    Join Date
    Mar 2019
    Posts
    9
    Articles
    0
    Excel Version
    excel 365
    Hi Charley

    I tryed to create a solution...

    You have 2 files:
    * Tables.xlsx : data file that contains 3 tables
    * Separator.xlsx :
    - contains a table with the path to the data file
    - Raw : all the data unfiltered
    - headers : just the lines of the headers (attention the ifrst column of the header need to be hard coded in the query
    - All Tables : lines from the RAW but with the table number added
    - then a sheet to show each table.

    Regards,

    Bernard

    PS: we could use the empty row as header lines...
    Attached Files Attached Files

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •