Spreadsheet: 836278d1689230925-need-help-in-formula-horizontal-report-to-vertically-report-view-sample-gk
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
123 | Line-1 | ABCD | 2002 | 100 | 1 | 6 | 11 | 16 | 21 | 26 |  | 10 | 30 | 20 | 0 | 0 | 0 |  | 10 | 30 | 20 | 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 | 80
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
123 | Line-2 | ABCD | 2002 | 100 | 5 | 10 | 15 | 20 | 25 | 30 |  | 40 | 0 | 0 | 0 | 0 | 0 |  | 40 | 0 | 0 | 0 | 0 | 0
Request to make like below by formula
 | Dept | LINE# | STYLE | PO# | Quantity
2023-01-02 00:00:00 | CUTTING | Line-1 | ABCD | 2002 | 1 |  | A | Process Header
2023-01-02 00:00:00 | CUTTING | Line-2 | EDFE | 2003 | 2 |  | B | Line information
2023-01-02 00:00:00 | CUTTING | Line-3 | PHDD | 2004 | 3 |  | C | Dates & totals
2023-01-02 00:00:00 | CUTTING | Line-1 | LIHH | 2005 | 4 |  | D | Data - numbers
2023-01-02 00:00:00 | CUTTING | Line-2 | ABCD | 2002 | 5 |  | E | Unique processes
2023-01-02 00:00:00 | STITCHING | Line-1 | ABCD | 2002 | 6 |  | F | No prodcesses (3)
2023-01-02 00:00:00 | STITCHING | Line-2 | EDFE | 2003 | 7 |  | G | Dates
2023-01-02 00:00:00 | STITCHING | Line-3 | PHDD | 2004 | 8 |  | H | No dates (6)
2023-01-02 00:00:00 | STITCHING | Line-1 | LIHH | 2005 | 9 |  | I | No lines (5)
2023-01-02 00:00:00 | STITCHING | Line-2 | ABCD | 2002 | 10 |  | J | Sequence overall rows (90)
2023-01-02 00:00:00 | PACKING | Line-1 | ABCD | 2002 | 11 |  | K | RESULT date
2023-01-02 00:00:00 | PACKING | Line-2 | EDFE | 2003 | 12 |  | L | RESULT department
2023-01-02 00:00:00 | PACKING | Line-3 | PHDD | 2004 | 13 |  | M | RESULT Line details
2023-01-02 00:00:00 | PACKING | Line-1 | LIHH | 2005 | 14 |  | N | RESULT Quantity
2023-01-02 00:00:00 | PACKING | Line-2 | ABCD | 2002 | 15
2023-01-03 00:00:00 | CUTTING | Line-1 | ABCD | 2002 | 16
2023-01-03 00:00:00 | CUTTING | Line-2 | EDFE | 2003 | 17
2023-01-03 00:00:00 | CUTTING | Line-3 | PHDD | 2004 | 18
2023-01-03 00:00:00 | CUTTING | Line-1 | LIHH | 2005 | 19
2023-01-03 00:00:00 | CUTTING | Line-2 | ABCD | 2002 | 20
2023-01-03 00:00:00 | STITCHING | Line-1 | ABCD | 2002 | 21
44929 | STITCHING | Line-2 | EDFE | 2003 | 22
44929 | STITCHING | Line-3 | PHDD | 2004 | 23
44929 | STITCHING | Line-1 | LIHH | 2005 | 24
44929 | STITCHING | Line-2 | ABCD | 2002 | 25
44929 | PACKING | Line-1 | ABCD | 2002 | 26
44929 | PACKING | Line-2 | EDFE | 2003 | 27
44929 | PACKING | Line-3 | PHDD | 2004 | 28
44929 | PACKING | Line-1 | LIHH | 2005 | 29
44929 | PACKING | Line-2 | ABCD | 2002 | 30
44930 | CUTTING | Line-1 | ABCD | 2002 | 10
44930 | CUTTING | Line-2 | EDFE | 2003 | 30
44930 | CUTTING | Line-3 | PHDD | 2004 | 30
44930 | CUTTING | Line-1 | LIHH | 2005 | 20
44930 | CUTTING | Line-2 | ABCD | 2002 | 40
44930 | STITCHING | Line-1 | ABCD | 2002 | 30
44930 | STITCHING | Line-2 | EDFE | 2003 | 50
44930 | STITCHING | Line-3 | PHDD | 2004 | 30
44930 | STITCHING | Line-1 | LIHH | 2005 | 10
44930 | STITCHING | Line-2 | ABCD | 2002 | 0
44930 | PACKING | Line-1 | ABCD | 2002 | 20
44930 | PACKING | Line-2 | EDFE | 2003 | 80
44930 | PACKING | Line-3 | PHDD | 2004 | 30
44930 | PACKING | Line-1 | LIHH | 2005 | 20
44930 | PACKING | Line-2 | ABCD | 2002 | 0
44931 | CUTTING | Line-1 | ABCD | 2002 | 0
44931 | CUTTING | Line-2 | EDFE | 2003 | 10
44931 | CUTTING | Line-3 | PHDD | 2004 | 10
44931 | CUTTING | Line-1 | LIHH | 2005 | 0
44931 | CUTTING | Line-2 | ABCD | 2002 | 0
44931 | STITCHING | Line-1 | ABCD | 2002 | 0
44931 | STITCHING | Line-2 | EDFE | 2003 | 50
44931 | STITCHING | Line-3 | PHDD | 2004 | 0
44931 | STITCHING | Line-1 | LIHH | 2005 | 0
44931 | STITCHING | Line-2 | ABCD | 2002 | 0
44931 | PACKING | Line-1 | ABCD | 2002 | 0
44931 | PACKING | Line-2 | EDFE | 2003 | 80
44931 | PACKING | Line-3 | PHDD | 2004 | 0
44931 | PACKING | Line-1 | LIHH | 2005 | 0
44931 | PACKING | Line-2 | ABCD | 2002 | 0
44932 | CUTTING | Line-1 | ABCD | 2002 | 10
44932 | CUTTING | Line-2 | EDFE | 2003 | 30
44932 | CUTTING | Line-3 | PHDD | 2004 | 30
44932 | CUTTING | Line-1 | LIHH | 2005 | 20
44932 | CUTTING | Line-2 | ABCD | 2002 | 40
44932 | STITCHING | Line-1 | ABCD | 2002 | 30
44932 | STITCHING | Line-2 | EDFE | 2003 | 50
44932 | STITCHING | Line-3 | PHDD | 2004 | 30
44932 | STITCHING | Line-1 | LIHH | 2005 | 10
44932 | STITCHING | Line-2 | ABCD | 2002 | 0
44932 | PACKING | Line-1 | ABCD | 2002 | 20
44932 | PACKING | Line-2 | EDFE | 2003 | 80
44932 | PACKING | Line-3 | PHDD | 2004 | 30
44932 | PACKING | Line-1 | LIHH | 2005 | 20
44932 | PACKING | Line-2 | ABCD | 2002 | 0
44933 | CUTTING | Line-1 | ABCD | 2002 | 0
44933 | CUTTING | Line-2 | EDFE | 2003 | 10
44933 | CUTTING | Line-3 | PHDD | 2004 | 10
44933 | CUTTING | Line-1 | LIHH | 2005 | 0
44933 | CUTTING | Line-2 | ABCD | 2002 | 0
44933 | STITCHING | Line-1 | ABCD | 2002 | 0
44933 | STITCHING | Line-2 | EDFE | 2003 | 50
44933 | STITCHING | Line-3 | PHDD | 2004 | 0
44933 | STITCHING | Line-1 | LIHH | 2005 | 0
44933 | STITCHING | Line-2 | ABCD | 2002 | 0
44933 | PACKING | Line-1 | ABCD | 2002 | 0
44933 | PACKING | Line-2 | EDFE | 2003 | 80
44933 | PACKING | Line-3 | PHDD | 2004 | 0
44933 | PACKING | Line-1 | LIHH | 2005 | 0
44933 | PACKING | Line-2 | ABCD | 2002 | 0