Reputation: 95
I have 2 sheets, Herein sheet1 are items that an employee has, and I want to organize it in sheet 2 by adding all items that particular employee has.
Can someone help me, please?
Example. In sheet 1 Employee mark have multiple items, in sheet 2 I want to total all the items that Employeemark has.
Sheet 1
*---*----*---*----*----*
| | ITEMS | Employee|
*---*--------*----*----*
| 1 | BOOK | MARK |
| 2 | PEN | MARK |
| 3 | tape | MARK |
| 4 | BOOK | MARK |
| 5 | PEN | GIL |
| 6 | TAPE | GIL |
| 7 | BAG | JANE |
| 8 | PEN | JANE |
*---*----*--------*----*
Sheet 2
*---*----*---*-----*------*------*------*
| |Employee| PEN | BOOK | TAPE | BAG |
*---*--------*-----*------*------*------*
| 1 | Mark | 1 | 2 | 1 | |
| 2 | GIL | 1 | | 1 | |
| 3 | JANE | 1 | | | 1 |
*---*--------*-----*------*------*------*
This is the formula I'm using, but no result.
=iferror(QUERY('sheet1'!a1:b,"select a, count(b) where b = 'pencil|tape' group by a"),{"♥","♥","♥"})
Upvotes: 1
Views: 32
Reputation: 1
=ARRAYFORMULA(QUERY(UPPER(B1:C),
"select Col2,count(Col2)
where Col2 is not null
group by Col2
pivot Col1", 1))
Upvotes: 1