Forum Discussion

NotSoFastEddie's avatar
NotSoFastEddie
Copper Contributor
Apr 26, 2024

Best way to segregate certain rows into each of their own worksheet from a primary

What would be the best way to take a single worksheet that contains multiple "record types" and copy them into their own worksheet?

The idea is to take each record type and create a copy of those in this spreadsheet into another.  In this example, there would be the main sheet (shown) and 4 new sheets containing each of the rows for a record type. (Pivot table?)

 

8 Replies

  • Andrew__K's avatar
    Andrew__K
    Copper Contributor

    NotSoFastEddie you can use FILTER to achieve this. 

     

    =FILTER(A1:G11,A1:A11="PCODE")

     

    or below using your table references

    =FILTER(TBL_Bouquets,TBL_Bouquets[Record Type]="PCODE")

     Repeat on each sheet for each record type.

     

    You could also use Power Query from Table/Range and simply filter by Record Type then load to corresponding sheet.

    • NotSoFastEddie's avatar
      NotSoFastEddie
      Copper Contributor
      Hey Andrew. Thanks very much for this option. It works great and is simple. I already have another use for it. Thanks again.
    • NotSoFastEddie's avatar
      NotSoFastEddie
      Copper Contributor

      HansVogelaar Thanks for the quick response.

      I took the VBA and put it into my "official" spreadsheet and ran the macro.

      when I run it I receive a failure message on the range sort.  Not sure what to do???Line where it died"official" spreadsheetError Received

Resources