best way to get a thick line between rows when data changes.

steve400243

Active Member
Joined
Sep 15, 2016
Messages
429
Office Version
  1. 365
  2. 2016
Platform
  1. Windows
Hello, I need the best way to get a thick line between rows when the data in column N changes. The Data is copied over from another sheet and There could be several hundred rows used, for this example I included 3 different changes in Column N . Please see the example below for the desired results. Thank you.

CFS Master Sheet.xlsm
ABCDEFGHIJKLMN
1HBLCONSIGNEEORIGINAL ETAOBLRCDMANIFEST SORTPLTCTNKGCBMCNTRVSLMODEDESTINATIONMBL
2HKS000074694DATA DISPLAY SYSTEMS LLC9/21/2021115300655422.947OOCU8194433FUSJFKCOSU6311228860
3HKS000074760ALTRAN CORPORATION9/21/202122633232.464OOCU8194433FMMFUSORDCOSU6311228860
4HKS000074773ADVANCED INPUT SYSTEMS9/21/20213302070.864OOCU8194433FUSSEACOSU6311228860
5HKS000074800AMERICAN RING CO INC9/21/2021464330.062.89OOCU8194433FUSBOSCOSU6311228860
6HKS000074830TRENTON TECHNOLOGY INC9/21/20215251222913.771OOCU8194433FMMFUSJFKCOSU6311228860
7HKS000074842APPLIED TECHNICAL C/O CAPIN-VYBORNY9/21/2021666560.186OOCU8194433FUSSEACOSU6311228860
8HKS000074849TRENTON TECHNOLOGY INC9/21/20217323361.755OOCU8194433FMMFUSJFKCOSU6311228860
9HKS000074852MECHATRONICS INC9/21/20218100737.82.096OOCU8194433FUSSEACOSU6311228860
10HKS000074866ADVANCED INPUT SYSTEMS9/21/202192504183.422OOCU8194433FUSSEACOSU6311228860
11HKS000074810DISNEY MERCHANDISE SOURCING & DISTRIBUTI9/21/2021102011156.77.256OOCU8194433FMMFUSLAXCOSU6311228860
12HKS000074829LUMASMART TECHNOLOGY9/21/2021112396241.078OOCU8194433FMMFUSDTWCOSU6311228860
13HKS000074836ADVANCED INPUT DEVICES INC9/21/202112544322.226OOCU8194433FUSSEACOSU6311228860
14HKS000074837MEMTRON TECHNOLOGIES CO9/21/20211323178.71.078OOCU8194433FMMFUSSEACOSU6311228860
15HKS000074860PANASONIC INDUSTRIAL DEVICES SALES CO9/21/202114947543.096OOCU8194433FUSLAXCOSU6311228860
16HKS000074757SUNBEAM PRODUCTS INC9/23/202115543.70.111OOLU9891085FMMFUSLAXCOSU6311849980
17HKS000074827MFJ ENTERPRISES INC9/23/202116508200.869OOLU9891085FMMFUSMEMCOSU6311849980
18HKS000074867VANGUARD PROTEX GLOBAL INC9/23/2021176212213537.545OOLU9891085FMMFUSMIACOSU6311849980
19HKS000074901PANGEA AUDIO DISTRIBUTING9/23/20211850674.51.841OOLU9891085FMMFUSDTWCOSU6311849980
20HKS000074916ASSEMBLY FASTENERS INC9/23/2021191151056.50.82OOLU9891085FMMFUSCLTCOSU6311849980
21HKS000074917AMERICAN RING CO INC9/23/2021204514056.8621.072OOLU9891085 FUSBOSCOSU6311849980
22HKS000074929VISIONTECH SOLUTIONS GROUP9/23/202121159870.377OOLU9891085FMMFUSORFCOSU6311849980
23HKS000074948PLEXUS CORP-NEENAH OPERATIONS9/23/202122410013854.763OOLU9891085FMMFUSORDCOSU6311849980
24HKS000074950ECOBEE C/O INGRAM MICRO LOGISTICS9/23/2021231222330.676OOLU9891085 FUSORDCOSU6311849980
25HKS000074973L K MACHINERY INC9/23/202124924572.505OOLU9891085FMMFUSDTWCOSU6311849980
26HKS000074996GARRETT ELECTRONICS INC9/23/20212539211673.038OOLU9891085 FUSDFWCOSU6311849980
27HKS000074972LUMASMART TECHNOLOGY9/23/2021262365751.068OOLU9891085FMMFUSDTWCOSU6311849980
28HKS000074990GARRETT ELECTRONICS INC9/23/202127697924.049OOLU9891085 FUSDFWCOSU6311849980
29TPS000076249AMERICAN LIGHTING INC9/25/202128448670.77.74HMMU5405680 FUSDENHDMUTPEM33615600
30TPS000076420ALTIMATE MEDICAL INC9/25/20212922445.60.46HMMU5405680FMMFUSMSPHDMUTPEM33615600
31TPS000076652WELLS VEHICLE ELECTORNICS9/25/202130118231.30.81HMMU5405680FMMFUSORDHDMUTPEM33615600
32TPS000076667DWYER INSTRUMENTS INC9/25/202131518444506.32HMMU5405680FMMFUSORDHDMUTPEM33615600
33TPS000076755WELLS VEHICLE ELECTRONICS LP9/25/20213241191135.716.9HMMU5405680FMMFUSORDHDMUTPEM33615600
34TPS000076760TRENTON TECHNOLOGY INC9/25/2021331351214.588.75HMMU5405680FMMFUSJFKHDMUTPEM33615600
35TPS000076785PURE SAFETY GROUP INC9/25/2021341203651.31HMMU5405680FMMFUSSEAHDMUTPEM33615600
36TPS000076797DWYER INSTRUMENTS INC9/25/2021356111.60.2HMMU5405680FMMFUSORDHDMUTPEM33615600
37TPS000076801ADVANCED INPUT DEVICES INC9/25/2021363352584.42HMMU5405680 FUSSEAHDMUTPEM33615600
38TPS000076802ADVANCED INPUT DEVICES INC9/25/202137455.920.2HMMU5405680 FUSSEAHDMUTPEM33615600
39TPS000076819DWYER INSTRUMENTS INC9/25/20213822272.80.46HMMU5405680FMMFUSORDHDMUTPEM33615600
40TPS000076909PURE AND SECURE LLC9/25/202139981446.93.14HMMU5405680 FUSMSPHDMUTPEM33615600
41TPS000076598REMOTE TECHNOLOGIES INC9/25/20214062071896.913.28HMMU5405680FMMFUSMSPHDMUTPEM33615600
Sheet1
 

Excel Facts

Why are there 1,048,576 rows in Excel?
The Excel team increased the size of the grid in 2007. There are 2^20 rows and 2^14 columns for a total of 17 billion cells.
Here's a macro you can try:
VBA Code:
Sub AddThickLine()
Dim R As Range, V As Variant, i As Long
Set R = Range("N2:N" & Cells(Rows.Count, "N").End(xlUp).Row)
V = R.Value
Application.ScreenUpdating = False
For i = 1 To UBound(V, 1) - 1
    If V(i, 1) <> V(i + 1, 1) Then
        With Cells(i + 1, "A").Resize(1, 14).Borders(xlEdgeBottom)
            .LineStyle = xlContinuous
            .ColorIndex = 0
            .TintAndShade = 0
            .Weight = xlMedium
        End With
    End If
Next i
Application.ScreenUpdating = True
End Sub
 
Upvote 0
Solution
Here's a macro you can try:
VBA Code:
Sub AddThickLine()
Dim R As Range, V As Variant, i As Long
Set R = Range("N2:N" & Cells(Rows.Count, "N").End(xlUp).Row)
V = R.Value
Application.ScreenUpdating = False
For i = 1 To UBound(V, 1) - 1
    If V(i, 1) <> V(i + 1, 1) Then
        With Cells(i + 1, "A").Resize(1, 14).Borders(xlEdgeBottom)
            .LineStyle = xlContinuous
            .ColorIndex = 0
            .TintAndShade = 0
            .Weight = xlMedium
        End With
    End If
Next i
Application.ScreenUpdating = True
End Sub
Thank you. I will test tomorrow when back at my office. Appreciate it!
 
Upvote 0
Thank you. I will test tomorrow when back at my office. Appreciate it!
Here's a macro you can try:
VBA Code:
Sub AddThickLine()
Dim R As Range, V As Variant, i As Long
Set R = Range("N2:N" & Cells(Rows.Count, "N").End(xlUp).Row)
V = R.Value
Application.ScreenUpdating = False
For i = 1 To UBound(V, 1) - 1
    If V(i, 1) <> V(i + 1, 1) Then
        With Cells(i + 1, "A").Resize(1, 14).Borders(xlEdgeBottom)
            .LineStyle = xlContinuous
            .ColorIndex = 0
            .TintAndShade = 0
            .Weight = xlMedium
        End With
    End If
Next i
Application.ScreenUpdating = True
End Sub
Excellent, Thank you JoeMo. This works as needed. Appreciate your time.
 
Upvote 0

Forum statistics

Threads
1,216,153
Messages
6,129,179
Members
449,491
Latest member
maxim_sivakon

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