Search code examples
google-sheetsfiltergoogle-sheets-formulagoogle-sheets-querygoogle-query-language

Split up combined Google sheet to separate sheet per person


I've been struggling for a couple of days now how to get this to work. I have a set of data that I get in a CSV format, that I will copy past in a Google Sheets workbook.

On sheet 1 I have the following (example) data:

Hours  Expertise   Responsible  Rate  Total 
4      Cleaning    Bob          11    44
2      Cleaning    Barb         15    30  
3      Woodwork    Xander       19    57
1,5    Electricity Bob          22    33

There are only 3 responsible people in this example, and I now need to create a sheet per person, showing only their data, but in the same way as it is in the combined sheet.

So what I would like to end up with (for this example) are 3 sheets:

Sheet Bob

Hours  Expertise   Responsible  Rate  Total 
4      Cleaning    Bob          11    44
1,5    Electricity Bob          22    33

Sheet Barb

Hours  Expertise   Responsible  Rate  Total 
2      Cleaning    Barb         15    30  

Sheet Xander

Hours  Expertise   Responsible  Rate  Total 
3      Woodwork    Xander       19    57

But to be honest, I'm kinda lost right now. I couldn't get this to work with pivot table or any of the other things I could find with google. I also tried using Vlookup, but then I end up with empty lines in between.


Solution

  • use:

    =QUERY({'sheet 1'!A:E}, "where Col3 = 'Bob'", 1)
    
    =QUERY({'sheet 1'!A:E}, "where Col3 = 'Barb'", 1)
    
    =QUERY({'sheet 1'!A:E}, "where Col3 = 'Xander'", 1)