FaizanRoshan
Board Regular
- Joined
- Jun 11, 2015
- Messages
- 54
Hi,
Here is code.
Sub Graph()1 Column = Range("m" & Columns.Count).End(xlToRight).Column
Set MR = Range("C2:S20" & Row)
For Each cell In MR
If cell.Value = "Yes" Then cell.Interior.ColorIndex = Range("PartsData!G2").Interior.ColorIndex
Next
End Sub
I use this code in excel for cell fill with color based on another cell color.
This code fill cell with color from "C2:S20" base on "G2" cell color.
Now i want to some change in code, so that code will fill cell color base on special color for each row cell.
like: For row "C3:C3" and cell color "G3" and row "C5:C5" with fill base on "G5" cell color.
Please help me to solve this issue ASAP.
Thanks advance for Help!
Here is code.
Sub Graph()1 Column = Range("m" & Columns.Count).End(xlToRight).Column
Set MR = Range("C2:S20" & Row)
For Each cell In MR
If cell.Value = "Yes" Then cell.Interior.ColorIndex = Range("PartsData!G2").Interior.ColorIndex
Next
End Sub
I use this code in excel for cell fill with color based on another cell color.
This code fill cell with color from "C2:S20" base on "G2" cell color.
Now i want to some change in code, so that code will fill cell color base on special color for each row cell.
like: For row "C3:C3" and cell color "G3" and row "C5:C5" with fill base on "G5" cell color.
Please help me to solve this issue ASAP.
Thanks advance for Help!