ndendrinos
01-31-2011, 07:57 PM
Private Sub Worksheet_Change(ByVal Target As Range)
If Range("B1") = "y" Then Range("A1").Font.ColorIndex = 3
If Range("B1") = "n" Then Range("A1").Font.ColorIndex = -4105
End Sub
Based on the idea above I want to use 4 columns like this:
Column A 's header is : Item
Column's B header is : Value
Column's C header is Part : Number
Column's D header is choose : Y (for Yes)/ N (for No)
If I choose Y then in the three adjacent cells to the left I need to change the font color to RED (3)
If I choose N then in the three adjacent cells to the left I need to change the font color to Automatic (-4105)
The reason for the N option is to correct an eventual mistake of choosing Y instead of N (hence reverting to Automatic)
The code needs to be "dynamic" and work as the user adds new "items"
Thank you
If Range("B1") = "y" Then Range("A1").Font.ColorIndex = 3
If Range("B1") = "n" Then Range("A1").Font.ColorIndex = -4105
End Sub
Based on the idea above I want to use 4 columns like this:
Column A 's header is : Item
Column's B header is : Value
Column's C header is Part : Number
Column's D header is choose : Y (for Yes)/ N (for No)
If I choose Y then in the three adjacent cells to the left I need to change the font color to RED (3)
If I choose N then in the three adjacent cells to the left I need to change the font color to Automatic (-4105)
The reason for the N option is to correct an eventual mistake of choosing Y instead of N (hence reverting to Automatic)
The code needs to be "dynamic" and work as the user adds new "items"
Thank you