Rolling

Jomu

New Member
Joined
Apr 19, 2011
Messages
13
What is the code snippet which can be, for example, the code below the cursor to scroll so that it is always in the places where the double occur. In the worksheet there is the first 5 rows which are locked and there is a button which is connected to the code so how to roll along the bottom lines so that it is always a line which is double the present? :laugh:

Sub aaa()
Dim lngSel As Long
Range("A:A").Interior.ColorIndex = xlNone
For i = Cells(Rows.Count, 1).End(xlUp).Row To 2 Step -1
If WorksheetFunction.CountIf(Range("A1:A" & i), Cells(i, 1).Value) > 1 Then
Cells(i, 1).Interior.ColorIndex = 3
lngSel = MsgBox("Duplicate files...Do You want to delete", vbYesNoCancel)
If lngSel = vbCancel Then Exit Sub
If lngSel = vbYes Then
Cells(i, 1).EntireRow.Delete
Else
Cells(i, 1).Interior.ColorIndex = xlNone
End If
End If
Next i
End Sub
 

Excel Facts

Format cells as time
Select range and press Ctrl+Shift+2 to format cells as time. (Shift 2 is the @ sign).

Forum statistics

Threads
1,224,552
Messages
6,179,484
Members
452,917
Latest member
MrsMSalt

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