Spreadsheet: 818397d1676805638-formula-to-grouping-data-subtotal-each-depart-and-grand-total
Sheet: Sheet1

 | COMPANY |  | DEPT |  | NAME |  |  |  | Name | DEPT | COMPANY
 | XYZ. Inc |  | EXTERNAL RELATION |  | MARIYONO |  | 1 |  |  | main
 | ABC. Inc |  | FINANCE & ACCOUNTING |  | NAWIL |  | 1 |  |  |  |  | ABC. Inc
 | XYZ. Inc |  | GENERAL SERVICES |  | WAHYUDIANTO |  | 1 |  | MAINTENANCE & CONSTRUCTION | ARIS | XYZ. Inc | MAINTENANCE & CONSTRUCTION | TRIYANTO | ABC. Inc
 | XYZ. Inc |  | HUMAN RESOURCES |  | MUTTAQIN |  | 1 |  | MAINTENANCE & CONSTRUCTION | WILSON | XYZ. Inc | Sub Total |  | 55
 | XYZ. Inc |  | MAINTENANCE & CONSTRUCTION |  | WILSON |  | 1 |  | Sub Total |  | 55 | Grand Total |  | 27
 | XYZ. Inc |  | MINE GEOLOGY & PLANNING |  | FAHRIAL |  | 1 |  | Grand Total |  | 27
 | XYZ. Inc |  | MINE GEOLOGY & PLANNING |  | MOECHAMMAD |  | 1
 | XYZ. Inc |  | OPERATION |  | SELAMAT |  | 1
 | XYZ. Inc |  | QSE |  | ARAFIK |  | 1
 | XYZ. Inc |  | EXTERNAL RELATION |  | NUR QAYIN |  | 1
 | XYZ. Inc |  | FINANCE & ACCOUNTING |  | [NAME] |  | 1
 | XYZ. Inc |  | GENERAL SERVICES |  | WAHYUDI |  | 1
 | XYZ. Inc |  | HUMAN RESOURCES |  | [NAME] |  | 1
 | XYZ. Inc |  | MAINTENANCE & CONSTRUCTION |  | ARIS |  | 1
 | XYZ. Inc |  | MINE GEOLOGY & PLANNING |  | MOHAMAD |  | 1
 | ABC. Inc |  | MINE GEOLOGY & PLANNING |  | [NAME] |  | 1
 | ABC. Inc |  | OPERATION |  | LIN SLAMET |  | 1
 | ABC. Inc |  | QSE |  | BAHAR |  | 1
 | ABC. Inc |  | EXTERNAL RELATION |  | AHMAD |  | 1
 | ABC. Inc |  | FINANCE & ACCOUNTING |  | ADI PUTRANTO |  | 1 |  | EXPECTED ANSWER / RESULT
 | ABC. Inc |  | GENERAL SERVICES |  | ALFIAN |  | 1 |  | XYZ. Inc |  |  | ABC. Inc
 | ABC. Inc |  | HUMAN RESOURCES |  | SUGENG |  | 1 |  | EXTERNAL RELATION | MARIYONO | XYZ. Inc | EXTERNAL RELATION | AHMAD | ABC. Inc
 | ABC. Inc |  | MAINTENANCE & CONSTRUCTION |  | TRIYANTO |  | 1 |  | EXTERNAL RELATION | NUR QAYIN | XYZ. Inc | Sub Total |  | 1
 | ABC. Inc |  | MINE GEOLOGY & PLANNING |  | IWAN |  | 1 |  | Sub Total |  | 2 | FINANCE & ACCOUNTING | ADI PUTRANTO | ABC. Inc
 | ABC. Inc |  | OPERATION |  | RISTANTO |  | 1 |  | FINANCE & ACCOUNTING | [NAME] | XYZ. Inc | FINANCE & ACCOUNTING | NAWIL | ABC. Inc
 | ABC. Inc |  | OPERATION |  | ABI HAIR |  | 1 |  | Sub Total |  | 1 | Sub Total |  | 2
 | ABC. Inc |  | QSE |  | ANDI YANTO |  | 1 |  | GENERAL SERVICES | WAHYUDI | XYZ. Inc | GENERAL SERVICES | ALFIAN | ABC. Inc
 |  |  |  |  |  |  |  |  | GENERAL SERVICES | WAHYUDIANTO | XYZ. Inc | Sub Total |  | 1
 |  |  |  |  |  |  |  |  | Sub Total |  | 2 | HUMAN RESOURCES | SUGENG | ABC. Inc
 |  |  |  |  |  |  |  |  | HUMAN RESOURCES | [NAME] | XYZ. Inc | Sub Total |  | 1
 |  |  |  |  |  |  |  |  | HUMAN RESOURCES | MUTTAQIN | XYZ. Inc | MAINTENANCE & CONSTRUCTION | TRIYANTO | ABC. Inc
 |  |  |  |  |  |  |  |  | Sub Total |  | 2 | Sub Total |  | 1
 |  |  |  |  |  |  |  |  | MAINTENANCE & CONSTRUCTION | ARIS | XYZ. Inc | MINE GEOLOGY & PLANNING | IWAN | ABC. Inc
 |  |  |  |  |  |  |  |  | MAINTENANCE & CONSTRUCTION | WILSON | XYZ. Inc | MINE GEOLOGY & PLANNING | [NAME] | ABC. Inc
 |  |  |  |  |  |  |  |  | Sub Total |  | 2 | Sub Total |  | 2
 |  |  |  |  |  |  |  |  | MINE GEOLOGY & PLANNING | FAHRIAL | XYZ. Inc | OPERATION | RISTANTO | ABC. Inc
 |  |  |  |  |  |  |  |  | MINE GEOLOGY & PLANNING | MOHAMAD | XYZ. Inc | OPERATION | ABI HAIR | ABC. Inc
 |  |  |  |  |  |  |  |  | MINE GEOLOGY & PLANNING | MOECHAMMAD | XYZ. Inc | OPERATION | LIN SLAMET | ABC. Inc
 |  |  |  |  |  |  |  |  | Sub Total |  | 3 | Sub Total |  | 3
 |  |  |  |  |  |  |  |  | OPERATION | SELAMAT | XYZ. Inc | QSE | ANDI YANTO | ABC. Inc
 |  |  |  |  |  |  |  |  | Sub Total |  | 1 | QSE | BAHAR | ABC. Inc
 |  |  |  |  |  |  |  |  | QSE | ARAFIK | XYZ. Inc | Sub Total |  | 2
 |  |  |  |  |  |  |  |  | Sub Total |  | 1 | Grand Total |  | 13
 |  |  |  |  |  |  |  |  | Grand Total |  | 14