If you have only a few suppliers, 4 or less, you could use conditional
formatting. If you have more, you would need event code, something like
Private Sub Worksheet_Change(ByVal Target As Range)
Const WS_RANGE As String = "B2:H10"
Dim maxValue As Boolean
On Error GoTo ws_exit:
Application.EnableEvents = False
If Not Intersect(Target, Me.Range(WS_RANGE)) Is Nothing Then
With Target
maxValue = .Value = Application.Max(.Value, Cells(.Row,
"B").Resize(1, 8))
If maxValue Then
Select Case .Column
Case 2: Cells(.Row, "A").Interior.ColorIndex = 3 'red
Case 3: Cells(.Row, "A").Interior.ColorIndex = 6 'yellow
Case 4: Cells(.Row, "A").Interior.ColorIndex = 5 'blue
Case 5: Cells(.Row, "A").Interior.ColorIndex = 10 'green
End Select
End If
End With
End If
ws_exit:
Application.EnableEvents = True
End Sub
'This is worksheet event code, which means that it needs to be
'placed in the appropriate worksheet code module, not a standard
'code module. To do this, right-click on the sheet tab, select
'the View Code option from the menu, and paste the code in.
--
HTH
RP
(remove nothere from the email address if mailing direct)