Hi,
I have problem with this formula:
It's all I got so far.
What I want is macro which checks if cell ranges (B3:B22)(E3:E22)(H3:H22)(K3:K22)(N3:N16)(Q3:Q13)(U3:U13) in sheet "Data" contains one of value from B2 in sheet "Help" and then colors cell range in sheet "Matrix" with wanted colors.
I hope it's clear enough for you all.
Link to test file: http://1drv.ms/23NdfVM
best regards,
Przemek
I have problem with this formula:
Code:
Sub Cell_color()Dim MyWorkbook As Workbook
Dim Matrix As Worksheet
Dim Help As Worksheet
Dim Data As Worksheet
Set MyWorkbook = ActiveWorkbook
Set Matrix = MyWorkbook.Sheets("Matrix")
Set Data = MyWorkbook.Sheets("Data")
Set Help = MyWorkbook.Sheets("Help")
If Data.Range("B3:B22").Value = Help.Range("B2").Value Then
Matrix.Range("B2:U2").Interior.ColorIndex = 37
Else
Matrix.Range("B2:U2").Interior.ColorIndex = 78
End If
End Sub
It's all I got so far.
What I want is macro which checks if cell ranges (B3:B22)(E3:E22)(H3:H22)(K3:K22)(N3:N16)(Q3:Q13)(U3:U13) in sheet "Data" contains one of value from B2 in sheet "Help" and then colors cell range in sheet "Matrix" with wanted colors.
I hope it's clear enough for you all.
Link to test file: http://1drv.ms/23NdfVM
best regards,
Przemek