Specific color cell content select one click than copy paste .

By Md Shaiful islam Talukder | 5:13 PM |
Specific color cell.
At first cursor click where ,which color cell select than in manue bar tools click run macro (or click button) Auto slected which color you select.
If you want selected color cell content copy, click copy than paste other place easily and work different way.
This simple code insert bellow copy and pest in open workbook (tools->Macro->Visual basic editor->Insert module->paste )easily find solution.
Sub SelectByColor()
 On Error Resume Next
 Application.ScreenUpdating = False
 Dim c As Range
 Dim r As Long
 Dim myArea As Range
 Dim myRange As Range
 Set myArea = ActiveSheet.UsedRange
 For Each c In myArea
  If c.Interior.ColorIndex = ActiveCell.Interior.ColorIndex Then
   If r = 0 Then
    Set myRange = c
    r = 1
   Else
    Set myRange = Union(myRange, c)
   End If
  End If
 Next c
 myRange.Select
 Application.ScreenUpdating = True
End Sub
'Md.Shaiful Islam Talukder


1 comment :

Top^