VBA Code Required

hrayani

Well-known Member
Joined
Jul 23, 2010
Messages
1,500
Office Version
  1. 2016
Platform
  1. Windows
Hello Friends,

I want to copy specific data in specific format from one worksheet to another (both worksheet in the same workbook)

Here is the short sample data

Running Orders New Style.xlsm
ABCDEFGHIJKLMNOPQRSTUV
2PO #REF #PO DATECustomerSupplierArticleQualityDyed or PrintedFiber ContentConstructionSIZEQTYUNITPO SHIP DATEACTUAL SHIP DATEREMARKSSAMPLINGPO # CONCATARTICLE CONCATEXTRA COLUMNVALUESTATUS
337742163329-Dec-21TEX 1MillsBed SetMicrofiber Satin - 100 GsmDisperse Print100% Polyester75D X 200D 107X66Normal143,760Set(s)2-May-22OCT - 2021377421Bed Set$699,576In Process
437742263329-Dec-21TEX 1MillsPillow PairMicrofiber Satin - 100 GsmDisperse Dyed + Dispers Print100% Polyester75D X 200D 107X66Multiple233,544Pair(s)2-May-22OCT - 2021377421 - 377422Bed Set - Pillow Pair$452,181In Process
537742363329-Dec-21TEX 1MillsBed SetMicrofiber Satin - 100 GsmDisperse Print100% Polyester75D X 200D 107X66Over94,240Set(s)2-May-22OCT - 2021377421 - 377422 - 377423Bed Set - Pillow Pair$673,612In Process
637742463329-Dec-21TEX 1MillsBed SetMicrofiber Satin - 100 GsmDisperse Print100% Polyester75D X 200D 107X66King37,110Set(s)2-May-22OCT - 2021377421 - 377422 - 377423 - 377424Bed Set - Pillow Pair$309,762In Process
737742563329-Dec-21TEX 1MillsSide PillowMicrofiber Satin - 100 GsmDisperse Dyed + Dispers Print100% Polyester75D X 200D 107X6640x145176,532Pc(s)2-May-22OCT - 2021377421 - 377422 - 377423 - 377424 - 377425Bed Set - Pillow Pair - Side Pillow$307,166In Process
898015463410-Dec-21TEX 1MillsBed SetMicrofiber Satin - 100 GsmDisperse Print100% Polyester75D X 200D 107X66Normal59,976Set(s)6-Jun-22OCT - 2021980154Bed Set$249,122In Process
998015563410-Dec-21TEX 1MillsBed SetMicrofiber Satin - 100 GsmDisperse Print100% Polyester75D X 200D 107X66King25,410Set(s)6-Jun-22OCT - 2021980154 - 980155Bed Set$170,777In Process
1098015663410-Dec-21TEX 1MillsBed SetMicrofiber Satin - 100 GsmDisperse Print100% Polyester75D X 200D 107X66Over47,976Set(s)6-Jun-22OCT - 2021980154 - 980155 - 980156Bed Set$254,075In Process
1198015763410-Dec-21TEX 1MillsPillow PairMicrofiber Satin - 100 GsmDisperse Print100% Polyester75D X 200D 107X66Multiple51,240Pair(s)6-Jun-22OCT - 2021980154 - 980155 - 980156 - 980157Bed Set - Pillow Pair$ 41,313In Process
1212345663510-Dec-21ROS 2UsmanFitted SheetCTN Jersey - 135 GsmReactive Dyed100% Cotton30'S Cotton100x2003,920Pc(s)13-Feb-22Best Price & Easy Sleep - Contract # 21176967123456Fitted Sheet$ 14,896Shipped
1312345763510-Dec-21ROS 2UsmanFitted SheetCTN Jersey - 135 GsmReactive Dyed100% Cotton30'S Cotton150x2002,400Pc(s)13-Feb-22Best Price & Easy Sleep - Contract # 21176967123456 - 123457Fitted Sheet$ 12,960Shipped
1422998863614-Dec-21LOSFabricsSheet SetCTN Renforce - 100 GsmPigment Printed Rotary100% Cotton30X30 / 76X50Single1,416Set(s)28-Feb-22229988Sheet Set$ 14,168In Process
1522990063614-Dec-21LOSFabricsSheet SetCTN Renforce - 100 GsmPigment Printed Rotary100% Cotton30X30 / 76X50Single3,456Set(s)28-Feb-22229988 - 229900Sheet Set$ 41,437In Process
1640317563721-Dec-21OFFTowelTerry Beach TowelCTN 320 GSMReactive Print100% Cotton70x150 cm60,160Pc(s)18-Apr-22Amount in euro increased to 13%403175Terry Beach Towel$205,982In Process
1740317663721-Dec-21OFFTowelPonchoCTN 320 GSMReactive Print100% Cotton60x120 cm56,092Pc(s)18-Apr-22Amount in euro increased to 13%403175 - 403176Terry Beach Towel - Poncho$205,998In Process
183100886387-Jan-22OFFTowelTerry TowelCTN 385 GSMReactive Dyed100% Cotton50x100 cm (2 Pc Set)142,566Set(s)10-Jun-22Young Living ▬ Amount in euro increased to 14%310088Terry Towel$367,307Shipped
193100896387-Jan-22OFFTowelTerry TowelCTN 385 GSMReactive Dyed100% Cotton70x140 cm124,382Pc(s)10-Jun-22Young Living ▬ Amount in euro increased to 14%310088 - 310089Terry Towel$314,786Shipped
2056789163912-Jan-22ROS 2UsmanFitted SheetCTN Jersey - 135 GsmReactive Dyed100% Cotton30'S Cotton100x2004,080Pc(s)13-May-22Best Price & Easy Sleep - Contract # 21176967567891Fitted Sheet$ 15,504Shipped
2156789263912-Jan-22ROS 2UsmanFitted SheetCTN Jersey - 135 GsmReactive Dyed100% Cotton30'S Cotton150x2002,220Pc(s)13-May-22Best Price & Easy Sleep - Contract # 21176967567891 - 567892Fitted Sheet$ 11,988Shipped
2212987564012-Jan-22ROS 2UsmanFitted SheetCTN Jersey - 135 GsmReactive Dyed100% Cotton30'S Cotton100x2003,840Pc(s)1-Jun-22Best Price & Easy Sleep - Contract # 21176967129875Fitted Sheet$ 14,592Shipped
2312987664012-Jan-22ROS 2UsmanFitted SheetCTN Jersey - 135 GsmReactive Dyed100% Cotton30'S Cotton150x2002,400Pc(s)1-Jun-22Best Price & Easy Sleep - Contract # 21176967129875 - 129876Fitted Sheet$ 12,960Shipped
ORDERS
Cell Formulas
RangeFormula
R3:R23R3=IF(ISBLANK(B3),"",IF(B3<>B2,A3,IF(ISNUMBER(SEARCH(A3,R2)),R2,R2&" - "&A3)))
S3:S23S3=IF(ISBLANK(B3),"",IF(B3<>B2,F3,IF(ISNUMBER(SEARCH(F3,S2)),S2,S2&" - "&F3)))


Sheet 1: Copy from Sheet ORDERS
Sheet2: Copy to Sheet RUNNING ORDER STATUS

I want the data to copied to sheet 2 with following conditions

1) Copy all rows showing "In Process" in Column V from sheet 1 to sheet 2 starting from cell B4
Columns to copy would be A,B,C,D,E,F,G,K,L,M,N & P (Total 12 Columns)

2) Sort Data - 1st by Customer in Alphabetical order then by Ascending order PO ship date

3) Insert a Line when a Ref # changes
a) On the inserted Line: Show 1st instance for columns PO #, REF #, PO Date, Customer, Supplier, Article, Quality, PO Shape Date Columns
b) On the inserted Line: Show "Multiple" if more than one entry is found for Size, Unit & Remarks Columns else show 1st Instance
c) On the inserted Line: Show Total for the Qty Column

4) In Column A add value 1 to all the copied rows & value 2 to all the inserted rows (This is because I will be filtering records further)

5) Content Banding When a Ref # Changes

6) Dark grey color to the Inserted Rows

So, the final look will be like this

Running Orders New Style.xlsm
ABCDEFGHIJKLM
4PO #REF #PO DATECustomerSupplierArticleQualitySIZEQTYUNITPO SHIP DATEREMARKS
5137742163329-Dec-21TEX 1MillsBed SetMicrofiber Satin - 100 GsmNormal143,760Set(s)2-May-22
6137742263329-Dec-21TEX 1MillsPillow PairMicrofiber Satin - 100 GsmMultiple233,544Pair(s)2-May-22
7137742363329-Dec-21TEX 1MillsBed SetMicrofiber Satin - 100 GsmOver94,240Set(s)2-May-22
8137742463329-Dec-21TEX 1MillsBed SetMicrofiber Satin - 100 GsmKing37,110Set(s)2-May-22
9137742563329-Dec-21TEX 1MillsSide PillowMicrofiber Satin - 100 Gsm40x145176,532Pc(s)2-May-22
10237742163329-Dec-22TEX 1MillsBed SetMicrofiber Satin - 100 GsmMultiple685,186Multiple2-May-22
11198015463410-Dec-21TEX 1MillsBed SetMicrofiber Satin - 100 GsmNormal59,976Set(s)6-Jun-22
12198015563410-Dec-21TEX 1MillsBed SetMicrofiber Satin - 100 GsmKing25,410Set(s)6-Jun-22
13198015663410-Dec-21TEX 1MillsBed SetMicrofiber Satin - 100 GsmOver47,976Set(s)6-Jun-22
14198015763410-Dec-21TEX 1MillsPillow PairMicrofiber Satin - 100 GsmMultiple51,240Pair(s)6-Jun-22
15298015463410-Dec-22TEX 1MillsBed SetMicrofiber Satin - 100 GsmMultiple184,602Multiple6-Jun-22
16122998863614-Dec-21LOSFabricsSheet SetCTN Renforce - 100 GsmSingle1,416Set(s)28-Feb-22
17122990063614-Dec-21LOSFabricsSheet SetCTN Renforce - 100 GsmSingle3,456Set(s)28-Feb-22
18222998863614-Dec-22LOSFabricsSheet SetCTN Renforce - 100 GsmSingle4,872Set(s)28-Feb-22
19140317563721-Dec-21OFFTowelTerry Beach TowelCTN 320 GSM70x150 cm60,160Pc(s)18-Apr-22Amount in euro increased to 13%
20140317663721-Dec-21OFFTowelPonchoCTN 320 GSM60x120 cm56,092Pc(s)18-Apr-22Amount in euro increased to 13%
21240317563721-Dec-22OFFTowelTerry Beach TowelCTN 320 GSMMultiple116,252Pc(s)18-Apr-22
22137742163329-Dec-21TEX 1MillsBed SetMicrofiber Satin - 100 GsmNormal143,760Set(s)2-May-22
23137742263329-Dec-21TEX 1MillsPillow PairMicrofiber Satin - 100 GsmMultiple233,544Pair(s)2-May-22
24137742363329-Dec-21TEX 1MillsBed SetMicrofiber Satin - 100 GsmOver94,240Set(s)2-May-22
25137742463329-Dec-21TEX 1MillsBed SetMicrofiber Satin - 100 GsmKing37,110Set(s)2-May-22
26137742563329-Dec-21TEX 1MillsSide PillowMicrofiber Satin - 100 Gsm40x145176,532Pc(s)2-May-22
27237742163329-Dec-22TEX 1MillsBed SetMicrofiber Satin - 100 GsmMultiple685,186Multiple2-May-22
28198015463410-Dec-21TEX 1MillsBed SetMicrofiber Satin - 100 GsmNormal59,976Set(s)6-Jun-22
29198015563410-Dec-21TEX 1MillsBed SetMicrofiber Satin - 100 GsmKing25,410Set(s)6-Jun-22
30198015663410-Dec-21TEX 1MillsBed SetMicrofiber Satin - 100 GsmOver47,976Set(s)6-Jun-22
31198015763410-Dec-21TEX 1MillsPillow PairMicrofiber Satin - 100 GsmMultiple51,240Pair(s)6-Jun-22
32298015463410-Dec-22TEX 1MillsBed SetMicrofiber Satin - 100 GsmMultiple184,602Multiple6-Jun-22
RUNNING ORDER STATUS


Any help would be appreciated,

Regards,

Humayun
 
Last edited:

Excel Facts

Convert text numbers to real numbers
Select a column containing text numbers. Press Alt+D E F to quickly convert text to numbers. Faster than "Convert to Number"
Try:
VBA Code:
Sub CopyData()
    Application.ScreenUpdating = False
    Dim LastRow As Long, srcWS As Worksheet, desWS As Worksheet, rng As Range, x As Long, i As Long, fRow As Long, lRow As Long, y As Long: y = 19
    Set srcWS = Sheets("ORDERS")
    Set desWS = Sheets("RUNNING ORDER STATUS")
    With srcWS
        .Range("A1").CurrentRegion.AutoFilter 22, "In Process"
        Intersect(.AutoFilter.Range.Offset(1), .Range("A:G,K:N,P:P")).Copy desWS.Cells(desWS.Rows.Count, "B").End(xlUp).Offset(1)
        .Range("A1").AutoFilter
    End With
    LastRow = desWS.Cells.Find("*", SearchOrder:=xlByRows, SearchDirection:=xlPrevious).Row
    With desWS.Sort
        .SortFields.Clear
        .SortFields.Add Key:=Range("E2:E" & LastRow), SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:=xlSortNormal
        .SortFields.Add Key:=Range("L2:L" & LastRow), SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:=xlSortNormal
        .SetRange Range("B1:M" & LastRow)
        .Header = xlYes
        .MatchCase = False
        .Orientation = xlTopToBottom
        .SortMethod = xlPinYin
        .Apply
    End With
    For x = LastRow To 3 Step -1
        With desWS
            If .Cells(x, 3) <> .Cells(x - 1, 3) Then
                .Rows(x).EntireRow.Insert
            End If
        End With
    Next x
    LastRow = desWS.Cells.Find("*", SearchOrder:=xlByRows, SearchDirection:=xlPrevious).Row
    With desWS.Range("B2:B" & LastRow).SpecialCells(xlCellTypeConstants)
        For i = 1 To .Areas.Count
            fRow = .Areas(i).Cells(1).Row
            lRow = .Areas(i).Cells.Find("*", SearchOrder:=xlByRows, SearchDirection:=xlPrevious).Row
            With desWS
                .Range("B" & lRow + 1 & ":M" & lRow + 1).Value = .Range("B" & fRow & ":M" & fRow).Value
                .Range("J" & lRow + 1).Value = WorksheetFunction.Sum(.Range("J" & fRow & ":J" & lRow))
                .Range("A" & fRow & ":A" & lRow) = 1
                .Range("A" & fRow & ":M" & lRow).Interior.ColorIndex = y
                .Range("A" & lRow + 1) = 2
                .Range("A" & lRow + 1 & ":M" & lRow + 1).Interior.ColorIndex = 15
                Set rng = .Range("I" & fRow & ":I" & lRow)
                If rng.Count = WorksheetFunction.CountIf(rng, rng(1)) Then
                    .Range("I" & lRow + 1) = rng(1)
                Else
                    .Range("I" & lRow + 1) = "Multiple"
                End If
                Set rng = .Range("K" & fRow & ":K" & lRow)
                If rng.Count = WorksheetFunction.CountIf(rng, rng(1)) Then
                    .Range("K" & lRow + 1) = rng(1)
                Else
                    .Range("K" & lRow + 1) = "Multiple"
                End If
                If y = 19 Then
                    y = 20
                Else
                    y = 19
                End If
            End With
        Next i
    End With
    Application.ScreenUpdating = True
End Sub
 
Upvote 0
Hi Mumps,

First of all many thanks for the code. I am almost there

Just few things I noticed

1) It starts pasting from Row B2... I request it to change it to B4
2) When I re-run the code it just overlaps on the existing data. So idea is to erase all the existing data (cells colors also) & start from scratch
3) It does not copy the Headings. Please tell the code to copy the headings also
4) The Remarks column is showing the 1st instance, whereas I want it to write Multiple just like the Size Column else 1st instance if there are multiple entries
5) Strange thing I noticed is, the format of the last row of the table. Pls see below red fonts

Running Orders New Style.xlsm
ABCDEFGHIJKLM
8137742163329-Dec-21TEX 1MillsBed SetMicrofiber Satin - 100 GsmNormal143,760Set(s)2-May-22
9137742263329-Dec-21TEX 1MillsPillow PairMicrofiber Satin - 100 GsmMultiple233,544Pair(s)2-May-22
10137742363329-Dec-21TEX 1MillsBed SetMicrofiber Satin - 100 GsmOver94,240Set(s)2-May-22
11137742463329-Dec-21TEX 1MillsBed SetMicrofiber Satin - 100 GsmKing37,110Set(s)2-May-22
12137742563329-Dec-21TEX 1MillsSide PillowMicrofiber Satin - 100 Gsm40x145176,532Pc(s)2-May-22
13237742163329-Dec-21TEX 1MillsBed SetMicrofiber Satin - 100 GsmMultiple685,186Multiple2-May-22
14198015463410-Dec-21TEX 1MillsBed SetMicrofiber Satin - 100 GsmNormal59,976Set(s)6-Jun-22
15198015563410-Dec-21TEX 1MillsBed SetMicrofiber Satin - 100 GsmKing25,410Set(s)6-Jun-22
16198015663410-Dec-21TEX 1MillsBed SetMicrofiber Satin - 100 GsmOver47,976Set(s)6-Jun-22
17198015763410-Dec-21TEX 1MillsPillow PairMicrofiber Satin - 100 GsmMultiple51,240Pair(s)6-Jun-22
18298015463410 12 21TEX 1MillsBed SetMicrofiber Satin - 100 GsmMultiple184602Multiple06 06 22
RUNNING ORDER STATUS
 
Upvote 0
Try:
VBA Code:
Sub CopyData()
    Application.ScreenUpdating = False
    Dim LastRow As Long, srcWS As Worksheet, desWS As Worksheet, rng As Range, x As Long, i As Long, fRow As Long, lRow As Long, y As Long: y = 19
    Set srcWS = Sheets("ORDERS")
    Set desWS = Sheets("RUNNING ORDER STATUS")
    desWS.UsedRange.Rows.Delete
    With srcWS
        .Range("A1").CurrentRegion.AutoFilter 22, "In Process"
        Intersect(.AutoFilter.Range, .Range("A:G,K:N,P:P")).Copy desWS.Range("B3")
        .Range("A1").AutoFilter
    End With
    LastRow = desWS.Cells.Find("*", SearchOrder:=xlByRows, SearchDirection:=xlPrevious).Row
    With desWS.Sort
        .SortFields.Clear
        .SortFields.Add Key:=Range("E3:E" & LastRow), SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:=xlSortNormal
        .SortFields.Add Key:=Range("L3:L" & LastRow), SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:=xlSortNormal
        .SetRange Range("B3:M" & LastRow)
        .Header = xlYes
        .MatchCase = False
        .Orientation = xlTopToBottom
        .SortMethod = xlPinYin
        .Apply
    End With
    For x = LastRow To 5 Step -1
        With desWS
            If .Cells(x, 3) <> .Cells(x - 1, 3) Then
                .Rows(x).EntireRow.Insert
            End If
        End With
    Next x
    LastRow = desWS.Cells.Find("*", SearchOrder:=xlByRows, SearchDirection:=xlPrevious).Row
    With desWS.Range("B4:B" & LastRow).SpecialCells(xlCellTypeConstants)
        For i = 1 To .Areas.Count
            fRow = .Areas(i).Cells(1).Row
            lRow = .Areas(i).Cells.Find("*", SearchOrder:=xlByRows, SearchDirection:=xlPrevious).Row
            With desWS
                .Range("B" & lRow + 1 & ":M" & lRow + 1).Value = .Range("B" & fRow & ":M" & fRow).Value
                .Range("J" & lRow + 1).Value = WorksheetFunction.Sum(.Range("J" & fRow & ":J" & lRow))
                .Range("A" & fRow & ":A" & lRow) = 1
                .Range("A" & fRow & ":M" & lRow).Interior.ColorIndex = y
                .Range("A" & lRow + 1) = 2
                .Range("A" & lRow + 1 & ":M" & lRow + 1).Interior.ColorIndex = 15
                Set rng = .Range("I" & fRow & ":I" & lRow)
                If rng.Count = WorksheetFunction.CountIf(rng, rng(1)) Then
                    .Range("I" & lRow + 1) = rng(1)
                Else
                    .Range("I" & lRow + 1) = "Multiple"
                End If
                Set rng = .Range("K" & fRow & ":K" & lRow)
                If rng.Count = WorksheetFunction.CountIf(rng, rng(1)) Then
                    .Range("K" & lRow + 1) = rng(1)
                Else
                    .Range("K" & lRow + 1) = "Multiple"
                End If
                Set rng = .Range("M" & fRow & ":M" & lRow)
                If rng.Count = WorksheetFunction.CountIf(rng, rng(1)) Then
                    .Range("M" & lRow + 1) = rng(1)
                ElseIf rng.Count = WorksheetFunction.CountIf(rng, "") Then
                    .Range("M" & lRow + 1) = ""
                Else
                    .Range("M" & lRow + 1) = "Multiple"
                End If
                If y = 19 Then
                    y = 20
                Else
                    y = 19
                End If
            End With
        Next i
        With desWS
            .Range("J4:J" & LastRow + 1).NumberFormat = "#,##0"
            .Range("L4:L" & LastRow + 1).NumberFormat = "[$-1009]d/mmm/yy;@"
        End With
    End With
    Application.ScreenUpdating = True
End Sub
 
Upvote 0
Solution
1) It starts pasting from Row B2... I request it to change it to B4
2) When I re-run the code it just overlaps on the existing data. So idea is to erase all the existing data (cells colors also) & start from scratch
3) It does not copy the Headings. Please tell the code to copy the headings also
4) The Remarks column is showing the 1st instance, whereas I want it to write Multiple just like the Size Column else 1st instance if there are multiple entries
5) Strange thing I noticed is, the format of the last row of the table. Pls see below red fonts

Thanks Again! for the wonderful code

Point # 1,2 & 4 SOLVED


Point # 5: I tried experiment a bit with your code & came up with this

Changing this line of the code
From This
VBA Code:
 LastRow = desWS.Cells.Find("*", SearchOrder:=xlByRows, SearchDirection:=xlPrevious).Row

To This
VBA Code:
 LastRow = desWS.Cells.Find("*", SearchOrder:=xlByRows, SearchDirection:=xlPrevious).Row + 1

Also removing the below part because it was not required anymore

VBA Code:
' With desWS
        '    .Range("J4:J" & LastRow + 1).NumberFormat = "#,##0"
        '    .Range("L4:L" & LastRow + 1).NumberFormat = "[$-1009]d-mmm-yy;@"
      '  End With

Point # 3: It still does not copy the headings. But if the code starts from row 5 instead of 4 then I could type in the headings for the first time coz the headings will & should always remain there & also I can set the format of the headings the way I want once & for all. I think this would be better

Moreover, I would like the code to clear everything from row # 5 at the beginning of the code to overcome the overlapping issue & also I would be having a lot of other formulas on top rows. I hope this makes sense
 
Upvote 0
This is what I get when I run the macro on the file you uploaded. You asked that the data be pasted starting in cell B4. That's what the macro does. The headers are also visible in row 3.
hrayani.xlsm
ABCDEFGHIJKLM
3PO #REF #PO DATECustomerSupplierArticleQualitySIZEQTYUNITPO SHIP DATEREMARKS
4122998863644544LOSFabricsSheet SetCTN Renforce - 100 GsmSingle1,416Set(s)28-Feb-22
5122990063644544LOSFabricsSheet SetCTN Renforce - 100 GsmSingle3,456Set(s)28-Feb-22
6222998863644544LOSFabricsSheet SetCTN Renforce - 100 GsmSingle4,872Set(s)28-Feb-22
7140317563744551OFFTowelTerry Beach TowelCTN 320 GSM70x150 cm60,160Pc(s)18-Apr-22Amount in euro increased to 13%
8140317663744551OFFTowelPonchoCTN 320 GSM60x120 cm56,092Pc(s)18-Apr-22Amount in euro increased to 13%
9240317563744551OFFTowelTerry Beach TowelCTN 320 GSMMultiple116,252Pc(s)18-Apr-22Amount in euro increased to 13%
10137742163344559TEX 1MillsBed SetMicrofiber Satin - 100 GsmNormal143,760Set(s)2-May-22
11137742263344559TEX 1MillsPillow PairMicrofiber Satin - 100 GsmMultiple233,544Pair(s)2-May-22
12137742363344559TEX 1MillsBed SetMicrofiber Satin - 100 GsmOver94,240Set(s)2-May-22
13137742463344559TEX 1MillsBed SetMicrofiber Satin - 100 GsmKing37,110Set(s)2-May-22
14137742563344559TEX 1MillsSide PillowMicrofiber Satin - 100 Gsm40x145176,532Pc(s)2-May-22
15237742163344559TEX 1MillsBed SetMicrofiber Satin - 100 GsmMultiple685,186Multiple2-May-22
16198015463444540TEX 1MillsBed SetMicrofiber Satin - 100 GsmNormal59,976Set(s)6-Jun-22
17198015563444540TEX 1MillsBed SetMicrofiber Satin - 100 GsmKing25,410Set(s)6-Jun-22
18198015663444540TEX 1MillsBed SetMicrofiber Satin - 100 GsmOver47,976Set(s)6-Jun-22
19198015763444540TEX 1MillsPillow PairMicrofiber Satin - 100 GsmMultiple51,240Pair(s)6-Jun-22
20298015463444540TEX 1MillsBed SetMicrofiber Satin - 100 GsmMultiple184,602Multiple6-Jun-22
RUNNING ORDER STATUS

If this is not what you want, please upload a file that shows your desired result.
 
Upvote 0
Hi Mumps,

I appreciate you are spending your time to help me

I figured out what must have gone wrong
My Initial post states that the heading starts from Row # 2 but you must have copied it to row # 1 that is why you are getting the headings & I am not

I have adjusted the data to Row # 1 (that's fine)
Honestly speaking, my actual data is also supposed to be starting from row # 1

Now in said case, is it possible to copy the data only starting from row # 4 & not headings
Sorry, for this but I just realized that I want to format the headings once & for all as per my choice of colors Coz headings will always be there at Row # 3

And also at the start of the code, clear everything from row # 4 till the last row. Don't clear/erase/delete etc anything above row # 4
 
Upvote 0
Please upload an updated file showing exactly how your data is organized and include a sheet that shows your desired results.
 
Upvote 0
Please upload an updated file showing exactly how your data is organized and include a sheet that shows your desired results.
Can you please guide me, where to upload it
 
Upvote 0
You can use the XL2BB button in the menu. If you use this add-on, select to show a mini sheet in the options. You could use Box.com or Dropbox.com or any other free upload site.
 
Upvote 0

Forum statistics

Threads
1,214,918
Messages
6,122,246
Members
449,075
Latest member
staticfluids

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top