a guest Jul 22nd, 2019 57 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Private Sub Worksheet_SelectionChange(ByVal rngSel As Range)
  2.   Set rngTable = [I2:K17]
  3.    If rngSel.Count > 1 Or Intersect(rngSel, rngTable) Is Nothing Then End
  4.    For Each rngCell In rngTable
  5. rngCell.Interior.ColorIndex = IIf(rngCell.Value = rngSel.Value, 27, -4142)
  6.    Next
  7.  End Sub
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand