Spreadsheet: 836293d1689243034-need-help-in-formula-horizontal-report-to-vertically-report-view-sample-gk-version-2-
Sheet: Sheet1

ACTUAL DATA |  |  |  |  | CUTTING |  |  |  |  |  |  | STITCHING |  |  |  |  |  |  | PACKING
ORDER | LINE# | STYLE | PO# | ORDER QTY | 2023-01-02 00:00:00 |  |  |  |  |  | TOTAL | 2023-01-02 00:00:00 |  |  |  |  |  | TOTAL | 2023-01-02 00:00:00 |  |  |  |  |  | TOTAL | Rejection
123 | Line-1 | ABCD | 2002 | 100 | 1 | 6 | 11 | 16 | 21 | 26 |  | 10 | 30 | 60 | 0 | 0 | 0 |  | 10 | 30 | 20 | 30 | 0 | 0 |  | 10
123 | Line-2 | ABCD | 2002 | 100 | 5 | 10 | 15 | 20 | 25 | 25 |  | 40 | 0 | 0 | 0 | 0 | 0 |  | 40 | 0 | 0 | 0 | 0 | 0
1234 | Line-2 | EDFE | 2003 | 300 | 2 | 7 | 12 | 17 | 22 | 27 |  | 30 | 50 | 80 | 10 | 50 | 80 |  | 30 | 50 | 80 | 10 | 50 | 60 |  | 20
523 | Line-3 | PHDD | 2004 | 100 | 3 | 8 | 13 | 18 | 23 | 28 |  | 30 | 30 | 30 | 10 | 0 | 0 |  | 30 | 30 | 30 | 10 | 0 | 0
6235 | Line-1 | LIHH | 2005 | 50 | 4 | 9 | 14 | 19 | 24 | 29 |  | 20 | 10 | 20 | 0 | 0 | 0 |  | 20 | 10 | 20 | 0 | 0 | 0
Request to make like below by formula
 | Dept | LINE# | STYLE | PO# | Quantity | Rejection
2023-01-02 00:00:00 | CUTTING | Line-1 | ABCD | 2002 | 1 |  |  | A | Process Header
2023-01-02 00:00:00 | CUTTING | Line-2 | ABCD | 2002 | 5 |  |  | B | Line information
2023-01-02 00:00:00 | CUTTING | Line-2 | EDFE | 2003 | 2 |  |  | C | Dates & totals
2023-01-02 00:00:00 | CUTTING | Line-3 | PHDD | 2004 | 3 |  |  | D | Data - numbers
2023-01-02 00:00:00 | CUTTING | Line-1 | LIHH | 2005 | 4 |  |  | E | Unique processes
2023-01-02 00:00:00 | STITCHING | Line-1 | ABCD | 2002 | 10 |  |  | F | No prodcesses (3)
2023-01-02 00:00:00 | STITCHING | Line-2 | ABCD | 2002 | 40 |  |  | G | Dates
2023-01-02 00:00:00 | STITCHING | Line-2 | EDFE | 2003 | 30 |  |  | H | No dates (6)
2023-01-02 00:00:00 | STITCHING | Line-3 | PHDD | 2004 | 30 |  |  | I | No lines (5)
2023-01-02 00:00:00 | STITCHING | Line-1 | LIHH | 2005 | 20 |  |  | J | Sequence overall rows (90)
2023-01-02 00:00:00 | PACKING | Line-1 | ABCD | 2002 | 10 |  |  | K | RESULT date
2023-01-02 00:00:00 | PACKING | Line-2 | ABCD | 2002 | 40 |  |  | L | RESULT department
2023-01-02 00:00:00 | PACKING | Line-2 | EDFE | 2003 | 30 |  |  | M | RESULT Line details
2023-01-02 00:00:00 | PACKING | Line-3 | PHDD | 2004 | 30 |  |  | N | RESULT Quantity
2023-01-02 00:00:00 | PACKING | Line-1 | LIHH | 2005 | 20
2023-01-03 00:00:00 | CUTTING | Line-1 | ABCD | 2002 | 6
2023-01-03 00:00:00 | CUTTING | Line-2 | ABCD | 2002 | 10
2023-01-03 00:00:00 | CUTTING | Line-2 | EDFE | 2003 | 7
2023-01-03 00:00:00 | CUTTING | Line-3 | PHDD | 2004 | 8
2023-01-03 00:00:00 | CUTTING | Line-1 | LIHH | 2005 | 9
2023-01-03 00:00:00 | STITCHING | Line-1 | ABCD | 2002 | 30
2023-01-03 00:00:00 | STITCHING | Line-2 | ABCD | 2002 | 0
2023-01-03 00:00:00 | STITCHING | Line-2 | EDFE | 2003 | 50
2023-01-03 00:00:00 | STITCHING | Line-3 | PHDD | 2004 | 30
2023-01-03 00:00:00 | STITCHING | Line-1 | LIHH | 2005 | 10
2023-01-03 00:00:00 | PACKING | Line-1 | ABCD | 2002 | 30
2023-01-03 00:00:00 | PACKING | Line-2 | ABCD | 2002 | 0
2023-01-03 00:00:00 | PACKING | Line-2 | EDFE | 2003 | 50
2023-01-03 00:00:00 | PACKING | Line-3 | PHDD | 2004 | 30
2023-01-03 00:00:00 | PACKING | Line-1 | LIHH | 2005 | 10
2023-01-04 00:00:00 | CUTTING | Line-1 | ABCD | 2002 | 11
2023-01-04 00:00:00 | CUTTING | Line-2 | ABCD | 2002 | 15
2023-01-04 00:00:00 | CUTTING | Line-2 | EDFE | 2003 | 12
2023-01-04 00:00:00 | CUTTING | Line-3 | PHDD | 2004 | 13
2023-01-04 00:00:00 | CUTTING | Line-1 | LIHH | 2005 | 14
2023-01-04 00:00:00 | STITCHING | Line-1 | ABCD | 2002 | 60
2023-01-04 00:00:00 | STITCHING | Line-2 | ABCD | 2002 | 0
2023-01-04 00:00:00 | STITCHING | Line-2 | EDFE | 2003 | 80
2023-01-04 00:00:00 | STITCHING | Line-3 | PHDD | 2004 | 30
2023-01-04 00:00:00 | STITCHING | Line-1 | LIHH | 2005 | 20
2023-01-04 00:00:00 | PACKING | Line-1 | ABCD | 2002 | 20
2023-01-04 00:00:00 | PACKING | Line-2 | ABCD | 2002 | 0
2023-01-04 00:00:00 | PACKING | Line-2 | EDFE | 2003 | 80
2023-01-04 00:00:00 | PACKING | Line-3 | PHDD | 2004 | 30
2023-01-04 00:00:00 | PACKING | Line-1 | LIHH | 2005 | 20
2023-01-05 00:00:00 | CUTTING | Line-1 | ABCD | 2002 | 16
2023-01-05 00:00:00 | CUTTING | Line-2 | ABCD | 2002 | 20
2023-01-05 00:00:00 | CUTTING | Line-2 | EDFE | 2003 | 17
2023-01-05 00:00:00 | CUTTING | Line-3 | PHDD | 2004 | 18
2023-01-05 00:00:00 | CUTTING | Line-1 | LIHH | 2005 | 19
2023-01-05 00:00:00 | STITCHING | Line-1 | ABCD | 2002 | 0
2023-01-05 00:00:00 | STITCHING | Line-2 | ABCD | 2002 | 0
2023-01-05 00:00:00 | STITCHING | Line-2 | EDFE | 2003 | 10
2023-01-05 00:00:00 | STITCHING | Line-3 | PHDD | 2004 | 10
2023-01-05 00:00:00 | STITCHING | Line-1 | LIHH | 2005 | 0
2023-01-05 00:00:00 | PACKING | Line-1 | ABCD | 2002 | 30 | 10
2023-01-05 00:00:00 | PACKING | Line-2 | ABCD | 2002 | 0
2023-01-05 00:00:00 | PACKING | Line-2 | EDFE | 2003 | 10
2023-01-05 00:00:00 | PACKING | Line-3 | PHDD | 2004 | 10
2023-01-05 00:00:00 | PACKING | Line-1 | LIHH | 2005 | 0
2023-01-06 00:00:00 | CUTTING | Line-1 | ABCD | 2002 | 21
2023-01-06 00:00:00 | CUTTING | Line-2 | ABCD | 2002 | 25
2023-01-06 00:00:00 | CUTTING | Line-2 | EDFE | 2003 | 22
2023-01-06 00:00:00 | CUTTING | Line-3 | PHDD | 2004 | 23
2023-01-06 00:00:00 | CUTTING | Line-1 | LIHH | 2005 | 24
2023-01-06 00:00:00 | STITCHING | Line-1 | ABCD | 2002 | 0
2023-01-06 00:00:00 | STITCHING | Line-2 | ABCD | 2002 | 0
2023-01-06 00:00:00 | STITCHING | Line-2 | EDFE | 2003 | 50
2023-01-06 00:00:00 | STITCHING | Line-3 | PHDD | 2004 | 0
2023-01-06 00:00:00 | STITCHING | Line-1 | LIHH | 2005 | 0
2023-01-06 00:00:00 | PACKING | Line-1 | ABCD | 2002 | 0
2023-01-06 00:00:00 | PACKING | Line-2 | ABCD | 2002 | 0
2023-01-06 00:00:00 | PACKING | Line-2 | EDFE | 2003 | 50
2023-01-06 00:00:00 | PACKING | Line-3 | PHDD | 2004 | 0
2023-01-06 00:00:00 | PACKING | Line-1 | LIHH | 2005 | 0
2023-01-07 00:00:00 | CUTTING | Line-1 | ABCD | 2002 | 26
2023-01-07 00:00:00 | CUTTING | Line-2 | ABCD | 2002 | 25
2023-01-07 00:00:00 | CUTTING | Line-2 | EDFE | 2003 | 27
2023-01-07 00:00:00 | CUTTING | Line-3 | PHDD | 2004 | 28
2023-01-07 00:00:00 | CUTTING | Line-1 | LIHH | 2005 | 29
2023-01-07 00:00:00 | STITCHING | Line-1 | ABCD | 2002 | 0
2023-01-07 00:00:00 | STITCHING | Line-2 | ABCD | 2002 | 0
2023-01-07 00:00:00 | STITCHING | Line-2 | EDFE | 2003 | 80
2023-01-07 00:00:00 | STITCHING | Line-3 | PHDD | 2004 | 0
2023-01-07 00:00:00 | STITCHING | Line-1 | LIHH | 2005 | 0
2023-01-07 00:00:00 | PACKING | Line-1 | ABCD | 2002 | 0
2023-01-07 00:00:00 | PACKING | Line-2 | ABCD | 2002 | 0
2023-01-07 00:00:00 | PACKING | Line-2 | EDFE | 2003 | 60 | 20
2023-01-07 00:00:00 | PACKING | Line-3 | PHDD | 2004 | 0
2023-01-07 00:00:00 | PACKING | Line-1 | LIHH | 2005 | 0