Guest User

Untitled

a guest
Jun 20th, 2018
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Sub Sticky_Selection()
  2.     Dim s As Range
  3.     Set s = Selection
  4.      
  5.  
  6. Application.ScreenUpdating = False
  7. Rng = Selection.Rows.Count
  8. For i = Rng To 1 Step -1
  9. myCheck = ActiveCell
  10. ActiveCell.Offset(1, 0).Select
  11. For j = 1 To i
  12. If ActiveCell = myCheck Then
  13. Selection.Font.Bold = True
  14. Selection.Font.ColorIndex = 3
  15. End If
  16. ActiveCell.Offset(1, 0).Select
  17. Next j
  18. ActiveCell.Offset(-i, 0).Select
  19. Next i
  20. Application.ScreenUpdating = True
  21.  
  22.      
  23.     s.Parent.Activate
  24.     s.Select 'NOT Activate - possibly more than one cell!
  25. End Sub
Add Comment
Please, Sign In to add comment