Multi Conditional Formula over area.

  • Thread starter Thread starter musox
  • Start date Start date
M

musox

I want to create a feature for my Fantasy Draft Excel Sheet that wil
highlight Players (within a certain position) that have the sam
bye-week as other players.

Simple Example:

I have the players names in A, their bye-week in B, and who drafted th
player in C.

Player bw owner
-----------------|-----|--------------
D. Culpepper 4
P. Manning 6
D. McNabb 5
M. Vick 9
M. Hasselbeck 4


If C2 = "me", then B2 AND B5's cell backgound would change colors.

To add the complexity, there "backup" players. Thus if I was able t
draft Manning also, I would want all the 6 bye-week items to chang
background colors.

Its pointless... but it seems interesting vs. manually highlight durin
draft day.

:
 
The code below can be easily modified to accomadate your needs....

Private Sub Worksheet_Change(ByVal Target As Range)

Dim icolor As Integer
If Not Intersect(Target, Range("A1:A10")) is Nothing Then
Select Case Target
Case 1 To 5
icolor = 6
Case 6 To 10
icolor = 12
Case 11 To 15
icolor = 7
Case 16 To 20
icolor = 53
Case 21 To 25
icolor = 15
Case 26 To 30
icolor = 42
Case Else
'Whatever
End Select
Target.Interior.ColorIndex = icolor
End If

End Sub
 
Hi !

For the first condition:
If C2 = "me", then B2 AND B5's cell backgound would
change colors.

Select the range of bye weeks in col B.
Conditional Formatting
Formula is: =AND($C2="me",COUNTIF(B$2:B$6,B2)>1)
Select your format styles.
OK out

I'm not following you on the second condition. That seems
to be a separate issue. How does it tie in with the first
condition? Need more specific info.

Biff
 
Thanks jpendegraft, I'll just have to figure out what this does! :D

Biff, thanks for the reply, however, if I don't get Culpepper (the odd
are I won't) then the formula wouldn't work for highlighting my actua
draft pick
 
Back
Top