Мне нужно создать похожий макрос для дубликатов (см. Ниже).Пользователь сможет выбрать символ столбца, и тогда все дубликаты из выбранного столбца будут выделены цветом.Я не как это сделать.
Ниже та же идея, но с пустыми ячейками.
Не могли бы вы помочь?THX!
Sub EmptyCells()
Dim kol As String
Dim ost As Long
ost = Cells(Rows.Count, "A").End(xlUp).Row
kol = InputBox("Enter column symbol: B, C...etc.", "Column symbol", "B")
If kol = vbNullString Then Exit Sub
If IsNumeric(kol) Then
MsgBox "You entered number, please enter column symbol", _
vbInformation, "ERROR"
Exit Sub
End If
If ost < 5 Then Exit Sub
Range("A5:E" & ost).Interior.Color = xlNone
Range(Cells(5, kol), Cells(ost, kol)).SpecialCells(xlCellTypeBlanks).Select
With Selection.Interior
.Pattern = xlSolid
.PatternColorIndex = xlAutomatic
.Color = 65535
.TintAndShade = 0
.PatternTintAndShade = 0
End With
End Sub