Forum Discussion

Justas4478's avatar
Justas4478
Icon for Post Prodigy rankPost Prodigy
9 months ago
Solved

Tidying excel spreadsheet in power query

Hi, I have excel file that has multiple tables in same sheet. It has some other tables that I do not need, but there is not easy way to remove them since size of the tables can change every week so ...
  • ronrsnfld's avatar
    9 months ago

    I believe this task can be done easily with a simple VBA script. Attach it to a button for ease of use, if necessary.

     

    The VBA Range.Find method will locate the row that contains TOTAT STD & TOTAL STD2.

    Then just delete the rows (or the contents of the rows) below that.

     

    If you want the desired table on a new sheet, then use the Range.Copy method to copy the rows up to and including the found row to the new sheet.