Thanks Nigel. I think I need a little more than Luck <g> My knowledge of VBA, is
less than my knowledge of Excel. I would also like the change to be
instantaneous. when I change/enter a condition in column D on sheet one I would
like the background colour to change according to the corresponding number in
sheet 2.
--
Regards
Michael Koerner
Hi Michael
Try this, it provides a basic framework to develop and meet your exact
needs......
Good Luck
Nigel
add the following to a module in the workbook...........
Public Sub ColourCode()
Dim vQuality As String
Dim vID As String
Dim vRow As Long, vCol As Long
For vRow = 1 To Worksheets("Sheet2").Range("A1").CurrentRegion.Rows.Count
For vCol = 1 To
Worksheets("Sheet2").Range("A1").CurrentRegion.Columns.Count
vID = Worksheets("Sheet2").Range("A1").CurrentRegion.Cells(vRow,
vCol).Value
vQuality = ""
On Error Resume Next
vQuality = Application.WorksheetFunction.VLookup _
(vID, Worksheets("Sheet1").Range("A1").CurrentRegion,
3, 0)
With Worksheets("Sheet2").Range("A1").CurrentRegion.Cells(vRow,
vCol).Interior
Select Case vQuality
Case "Good": .ColorIndex = 4: .Pattern = xlSolid
Case "Fair": .ColorIndex = 44: .Pattern = xlSolid
Case "Poor": .ColorIndex = 3: .Pattern = xlSolid
End Select
End With
Next
Next
End Sub
Michael Koerner said:
I have a workbook with 2 active sheets. Sheet One contains the following
headings
ID No. | Courtesy of | Photo Quality ...
001 Poor
002 Good
Sheet 2 is a grid of numbers from 001 - 1000.
How would I have the background colour for the numbered cells in sheet 2 change
to red (poor) yellow (fair) green (good) to match the ID No. and Photo quality
from sheet 1?
Any assistance, as always, is greatly appreciated
http://www.newsfeed.com The #1 Newsgroup Service in the World! >100,000
Newsgroups