FaizanRoshan
Board Regular
- Joined
- Jun 11, 2015
- Messages
- 54
Hi,
I have vba code that fill row cell with color if value is "yes" based on another cell color.
The Problem is that, i have special color for each row. but code only fill with one color, i want to fill row cell with its special color.
Code is here:
Sub Graph()
1 Column = Range("m" & Columns.Count).End(xlToRight).Column
Set MR = Range("C2:S1000" & Row)
For Each cell In MR
If cell.Value = "Yes" Then cell.Interior.ColorIndex = Range("PartsData!G20").Interior.ColorIndex
Next
End Sub
Here is Range(C2:S1000) is row and ("PartsData!G2") is color cell. where range C2:S1000 take color. There are Color Range is ("G2:G1000"). but code not take new color for new row.
Like: Row Range("C4:S4") will take "G4" color but its take "G2" color cell.
Is this possible using Vba.
Thanks Advance for all Help.
I have vba code that fill row cell with color if value is "yes" based on another cell color.
The Problem is that, i have special color for each row. but code only fill with one color, i want to fill row cell with its special color.
Code is here:
Sub Graph()
1 Column = Range("m" & Columns.Count).End(xlToRight).Column
Set MR = Range("C2:S1000" & Row)
For Each cell In MR
If cell.Value = "Yes" Then cell.Interior.ColorIndex = Range("PartsData!G20").Interior.ColorIndex
Next
End Sub
Here is Range(C2:S1000) is row and ("PartsData!G2") is color cell. where range C2:S1000 take color. There are Color Range is ("G2:G1000"). but code not take new color for new row.
Like: Row Range("C4:S4") will take "G4" color but its take "G2" color cell.
Is this possible using Vba.
Thanks Advance for all Help.