Spreadsheet: 836424d1689343850-need-help-in-formula-horizontal-report-to-vertically-report-view-sample
Sheet: Sheet1

ACTUAL DATA | Column1 | Column2 | Column3 | Column4 | CUTTING | Column5 | Column6 | Column7 | Column8 | Column9 | Column10 | Column11 | STITCHING | Column12 | Column13 | Column14 | Column15 | Column16 | Column17 | PACKING | Column18 | Column19 | Column20 | Column21 | Column22 | Column23
ORDER | LINE# | STYLE | PO# | ORDER QTY | 2023-01-02 00:00:00 |  |  |  |  |  | continue date if the order is balance in the line | TOTAL | 2023-01-02 00:00:00 |  |  |  |  |  | TOTAL | 2023-01-02 00:00:00 |  |  |  |  |  | TOTAL
123 | Line-1 | ABCD | 2002 | 100 | 20 | 30 | 10 | 0 | 0 | 0 |  |  | 10 | 30 | 20 | 0 | 0 | 0 |  | 10 | 30 | 20 | 0 | 0 | 0
1234 | Line-2 | EDFE | 2003 | 300 | 60 | 20 | 40 | 60 | 80 | 40 |  |  | 30 | 50 | 80 | 10 | 50 | 80 |  | 30 | 50 | 80 | 10 | 50 | 80
523 | Line-3 | PHDD | 2004 | 100 | 60 | 20 | 20 | 0 | 0 | 0 |  |  | 30 | 30 | 30 | 10 | 0 | 0 |  | 30 | 30 | 30 | 10 | 0 | 0
6235 | Line-1 | LIHH | 2005 | 50 | 50 | 0 | 0 | 0 | 0 | 0 |  |  | 20 | 10 | 20 | 0 | 0 | 0 |  | 20 | 10 | 20 | 0 | 0 | 0
123 | Line-2 | ABCD | 2002 | 100 | 20 | 20 | 0 | 0 | 0 | 0 |  |  | 40 | 0 | 0 | 0 | 0 | 0 |  | 40 | 0 | 0 | 0 | 0 | 0
Request to make like below by formula
DATE | Department | LINE# | STYLE | PO# | Produced QTY |  | DATE | DEPARTMENT | LINE# | Style | PO# | ORDER | Produced
2023-01-02 00:00:00 | Cutting |  |  |  |  |  | 1/2/2023 | CUTTING | Line-2 | EDFE | 2003 | 1234 | 60
2023-01-02 00:00:00 | Stitching |  |  |  |  |  | 1/2/2023 | STITCHING | Line-1 | LIHH | 2005 | 6235 | 20
2023-01-02 00:00:00 | Packing |  |  |  |  |  | 1/2/2023 | PACKING | Line-1 | LIHH | 2005 | 6235 | 20
2023-01-03 00:00:00 | Cutting |  |  |  |  |  | 1/2/2023 | PACKING | Line-1 | ABCD | 2002 | 123 | 10
2023-01-03 00:00:00 | Stitching |  |  |  |  |  | 1/2/2023 | CUTTING | Line-2 | ABCD | 2002 | 123 | 20
2023-01-03 00:00:00 | Packing |  |  |  |  |  | 1/2/2023 | STITCHING | Line-2 | EDFE | 2003 | 1234 | 30
2023-01-04 00:00:00 | Cutting |  |  |  |  |  | 1/2/2023 | STITCHING | Line-3 | PHDD | 2004 | 523 | 30
2023-01-04 00:00:00 | Stitching |  |  |  |  |  | 1/2/2023 | CUTTING | Line-3 | PHDD | 2004 | 523 | 60
2023-01-04 00:00:00 | Packing |  |  |  |  |  | 1/2/2023 | PACKING | Line-3 | PHDD | 2004 | 523 | 30
2023-01-05 00:00:00 | Cutting |  |  |  |  |  | 1/2/2023 | CUTTING | Line-1 | LIHH | 2005 | 6235 | 50
2023-01-05 00:00:00 | Stitching |  |  |  |  |  | 1/2/2023 | PACKING | Line-2 | EDFE | 2003 | 1234 | 30
2023-01-05 00:00:00 | Packing |  |  |  |  |  | 1/2/2023 | STITCHING | Line-2 | ABCD | 2002 | 123 | 40
2023-01-06 00:00:00 | Cutting |  |  |  |  |  | 1/2/2023 | STITCHING | Line-1 | ABCD | 2002 | 123 | 10
2023-01-06 00:00:00 | Stitching |  |  |  |  |  | 1/2/2023 | PACKING | Line-2 | ABCD | 2002 | 123 | 40
2023-01-06 00:00:00 | Packing |  |  |  |  |  | 1/2/2023 | CUTTING | Line-1 | ABCD | 2002 | 123 | 20
2023-01-07 00:00:00 | Cutting |  |  |  |  |  | 1/3/2023 | STITCHING | Line-2 | EDFE | 2003 | 1234 | 50
2023-01-07 00:00:00 | Stitching |  |  |  |  |  | 1/3/2023 | CUTTING | Line-1 | LIHH | 2005 | 6235 | 0
2023-01-07 00:00:00 | Packing |  |  |  |  |  | 1/3/2023 | PACKING | Line-2 | ABCD | 2002 | 123 | 0
 |  |  |  |  |  |  | 1/3/2023 | CUTTING | Line-3 | PHDD | 2004 | 523 | 20
 |  |  |  |  |  |  | 1/3/2023 | CUTTING | Line-1 | ABCD | 2002 | 123 | 30
 |  |  |  |  |  |  | 1/3/2023 | PACKING | Line-2 | EDFE | 2003 | 1234 | 50
 |  |  |  |  |  |  | 1/3/2023 | STITCHING | Line-3 | PHDD | 2004 | 523 | 30
 |  |  |  |  |  |  | 1/3/2023 | PACKING | Line-3 | PHDD | 2004 | 523 | 30
 |  |  |  |  |  |  | 1/3/2023 | CUTTING | Line-2 | ABCD | 2002 | 123 | 20
 |  |  |  |  |  |  | 1/3/2023 | STITCHING | Line-1 | ABCD | 2002 | 123 | 30
 |  |  |  |  |  |  | 1/3/2023 | PACKING | Line-1 | ABCD | 2002 | 123 | 30
 |  |  |  |  |  |  | 1/3/2023 | STITCHING | Line-2 | ABCD | 2002 | 123 | 0
 |  |  |  |  |  |  | 1/3/2023 | STITCHING | Line-1 | LIHH | 2005 | 6235 | 10
 |  |  |  |  |  |  | 1/3/2023 | PACKING | Line-1 | LIHH | 2005 | 6235 | 10
 |  |  |  |  |  |  | 1/3/2023 | CUTTING | Line-2 | EDFE | 2003 | 1234 | 20
 |  |  |  |  |  |  | 1/4/2023 | STITCHING | Line-3 | PHDD | 2004 | 523 | 30
 |  |  |  |  |  |  | 1/4/2023 | STITCHING | Line-2 | ABCD | 2002 | 123 | 0
 |  |  |  |  |  |  | 1/4/2023 | CUTTING | Line-2 | ABCD | 2002 | 123 | 0
 |  |  |  |  |  |  | 1/4/2023 | PACKING | Line-3 | PHDD | 2004 | 523 | 30
 |  |  |  |  |  |  | 1/4/2023 | STITCHING | Line-1 | LIHH | 2005 | 6235 | 20
 |  |  |  |  |  |  | 1/4/2023 | CUTTING | Line-1 | LIHH | 2005 | 6235 | 0
 |  |  |  |  |  |  | 1/4/2023 | PACKING | Line-2 | ABCD | 2002 | 123 | 0
 |  |  |  |  |  |  | 1/4/2023 | PACKING | Line-1 | LIHH | 2005 | 6235 | 20
 |  |  |  |  |  |  | 1/4/2023 | CUTTING | Line-3 | PHDD | 2004 | 523 | 20
 |  |  |  |  |  |  | 1/4/2023 | CUTTING | Line-2 | EDFE | 2003 | 1234 | 40
 |  |  |  |  |  |  | 1/4/2023 | STITCHING | Line-2 | EDFE | 2003 | 1234 | 80
 |  |  |  |  |  |  | 1/4/2023 | PACKING | Line-2 | EDFE | 2003 | 1234 | 80
 |  |  |  |  |  |  | 1/4/2023 | CUTTING | Line-1 | ABCD | 2002 | 123 | 10
 |  |  |  |  |  |  | 1/4/2023 | PACKING | Line-1 | ABCD | 2002 | 123 | 20
 |  |  |  |  |  |  | 1/4/2023 | STITCHING | Line-1 | ABCD | 2002 | 123 | 20
 |  |  |  |  |  |  | 1/5/2023 | CUTTING | Line-2 | ABCD | 2002 | 123 | 0
 |  |  |  |  |  |  | 1/5/2023 | STITCHING | Line-2 | EDFE | 2003 | 1234 | 10
 |  |  |  |  |  |  | 1/5/2023 | STITCHING | Line-1 | LIHH | 2005 | 6235 | 0
 |  |  |  |  |  |  | 1/5/2023 | PACKING | Line-1 | LIHH | 2005 | 6235 | 0
 |  |  |  |  |  |  | 1/5/2023 | CUTTING | Line-2 | EDFE | 2003 | 1234 | 60
 |  |  |  |  |  |  | 1/5/2023 | CUTTING | Line-1 | LIHH | 2005 | 6235 | 0
 |  |  |  |  |  |  | 1/5/2023 | PACKING | Line-1 | ABCD | 2002 | 123 | 0
 |  |  |  |  |  |  | 1/5/2023 | STITCHING | Line-1 | ABCD | 2002 | 123 | 0
 |  |  |  |  |  |  | 1/5/2023 | PACKING | Line-2 | ABCD | 2002 | 123 | 0
 |  |  |  |  |  |  | 1/5/2023 | CUTTING | Line-3 | PHDD | 2004 | 523 | 0
 |  |  |  |  |  |  | 1/5/2023 | PACKING | Line-2 | EDFE | 2003 | 1234 | 10
 |  |  |  |  |  |  | 1/5/2023 | CUTTING | Line-1 | ABCD | 2002 | 123 | 0
 |  |  |  |  |  |  | 1/5/2023 | STITCHING | Line-3 | PHDD | 2004 | 523 | 10
 |  |  |  |  |  |  | 1/5/2023 | PACKING | Line-3 | PHDD | 2004 | 523 | 10
 |  |  |  |  |  |  | 1/5/2023 | STITCHING | Line-2 | ABCD | 2002 | 123 | 0
 |  |  |  |  |  |  | 1/6/2023 | PACKING | Line-1 | ABCD | 2002 | 123 | 0
 |  |  |  |  |  |  | 1/6/2023 | PACKING | Line-2 | ABCD | 2002 | 123 | 0
 |  |  |  |  |  |  | 1/6/2023 | CUTTING | Line-1 | ABCD | 2002 | 123 | 0
 |  |  |  |  |  |  | 1/6/2023 | STITCHING | Line-2 | ABCD | 2002 | 123 | 0
 |  |  |  |  |  |  | 1/6/2023 | STITCHING | Line-1 | ABCD | 2002 | 123 | 0
 |  |  |  |  |  |  | 1/6/2023 | PACKING | Line-1 | LIHH | 2005 | 6235 | 0
 |  |  |  |  |  |  | 1/6/2023 | CUTTING | Line-2 | ABCD | 2002 | 123 | 0
 |  |  |  |  |  |  | 1/6/2023 | CUTTING | Line-1 | LIHH | 2005 | 6235 | 0
 |  |  |  |  |  |  | 1/6/2023 | STITCHING | Line-2 | EDFE | 2003 | 1234 | 50
 |  |  |  |  |  |  | 1/6/2023 | STITCHING | Line-3 | PHDD | 2004 | 523 | 0
 |  |  |  |  |  |  | 1/6/2023 | PACKING | Line-2 | EDFE | 2003 | 1234 | 50
 |  |  |  |  |  |  | 1/6/2023 | CUTTING | Line-3 | PHDD | 2004 | 523 | 0
 |  |  |  |  |  |  | 1/6/2023 | STITCHING | Line-1 | LIHH | 2005 | 6235 | 0
 |  |  |  |  |  |  | 1/6/2023 | PACKING | Line-3 | PHDD | 2004 | 523 | 0
 |  |  |  |  |  |  | 1/6/2023 | CUTTING | Line-2 | EDFE | 2003 | 1234 | 80
 |  |  |  |  |  |  | 1/7/2023 | STITCHING | Line-3 | PHDD | 2004 | 523 | 0
 |  |  |  |  |  |  | 1/7/2023 | STITCHING | Line-2 | EDFE | 2003 | 1234 | 80
 |  |  |  |  |  |  | 1/7/2023 | STITCHING | Line-2 | ABCD | 2002 | 123 | 0
 |  |  |  |  |  |  | 1/7/2023 | PACKING | Line-2 | ABCD | 2002 | 123 | 0
 |  |  |  |  |  |  | 1/7/2023 | CUTTING | Line-3 | PHDD | 2004 | 523 | 0
 |  |  |  |  |  |  | 1/7/2023 | PACKING | Line-2 | EDFE | 2003 | 1234 | 80
 |  |  |  |  |  |  | 1/7/2023 | CUTTING | Line-1 | LIHH | 2005 | 6235 | 0
 |  |  |  |  |  |  | 1/7/2023 | STITCHING | Line-1 | ABCD | 2002 | 123 | 0
 |  |  |  |  |  |  | 1/7/2023 | STITCHING | Line-1 | LIHH | 2005 | 6235 | 0
 |  |  |  |  |  |  | 1/7/2023 | PACKING | Line-1 | LIHH | 2005 | 6235 | 0
 |  |  |  |  |  |  | 1/7/2023 | CUTTING | Line-2 | EDFE | 2003 | 1234 | 40
 |  |  |  |  |  |  | 1/7/2023 | PACKING | Line-1 | ABCD | 2002 | 123 | 0
 |  |  |  |  |  |  | 1/7/2023 | CUTTING | Line-1 | ABCD | 2002 | 123 | 0
 |  |  |  |  |  |  | 1/7/2023 | PACKING | Line-3 | PHDD | 2004 | 523 | 0
 |  |  |  |  |  |  | 1/7/2023 | CUTTING | Line-2 | ABCD | 2002 | 123 | 0