Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I want to color a row from column G to AB if range("p" & currentrow) value
changes... currentrow being the row of the cell value that was changed... how do select the row of the cell that was changed? Thanks for the help |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Private Sub Worksheet_Change(ByVal Target As Range)
if Target.Column = 16 then Cells(Target.Row,"G").Resize(1,22).Interior.ColorI ndex = 3 End if End Sub Right click on the sheet tab and select view Code. -- Regards, Tom Ogilvy "John" wrote in message ... I want to color a row from column G to AB if range("p" & currentrow) value changes... currentrow being the row of the cell value that was changed... how do select the row of the cell that was changed? Thanks for the help |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Tom, thanks for the reply. Nothing changes when my cell value changes (it
changes to true of false)... here is the code... Private Sub Worksheet_Change(ByVal Target As Range) If Target.Column = 16 Then If Target.Value = "true" Then Cells(Target.Row, "G").Resize(1, 22).Interior.ColorIndex = 15 If Target.Value = "false" Then Cells(Target.Row, "G").Resize(1, 22).Interior.ColorIndex = 0 End If End Sub "Tom Ogilvy" wrote: Private Sub Worksheet_Change(ByVal Target As Range) if Target.Column = 16 then Cells(Target.Row,"G").Resize(1,22).Interior.ColorI ndex = 3 End if End Sub Right click on the sheet tab and select view Code. -- Regards, Tom Ogilvy "John" wrote in message ... I want to color a row from column G to AB if range("p" & currentrow) value changes... currentrow being the row of the cell value that was changed... how do select the row of the cell that was changed? Thanks for the help |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I interpreted your requirement for someone manually making an entry in
column P. If that isn't the requirement, try this revision: Private Sub Worksheet_Change(ByVal Target As Range) If Target.Value = True Then Cells(Target.Row, "G").Resize(1, 22).Interior.ColorIndex = 15 If Target.Value = False Then Cells(Target.Row, "G").Resize(1, 22).Interior.ColorIndex = xlNone End If End Sub -- Regards, Tom Ogilvy "John" wrote in message ... Tom, thanks for the reply. Nothing changes when my cell value changes (it changes to true of false)... here is the code... Private Sub Worksheet_Change(ByVal Target As Range) If Target.Column = 16 Then If Target.Value = "true" Then Cells(Target.Row, "G").Resize(1, 22).Interior.ColorIndex = 15 If Target.Value = "false" Then Cells(Target.Row, "G").Resize(1, 22).Interior.ColorIndex = 0 End If End Sub "Tom Ogilvy" wrote: Private Sub Worksheet_Change(ByVal Target As Range) if Target.Column = 16 then Cells(Target.Row,"G").Resize(1,22).Interior.ColorI ndex = 3 End if End Sub Right click on the sheet tab and select view Code. -- Regards, Tom Ogilvy "John" wrote in message ... I want to color a row from column G to AB if range("p" & currentrow) value changes... currentrow being the row of the cell value that was changed... how do select the row of the cell that was changed? Thanks for the help |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Tom I appreciate the help, that works. However, my true and false are linked
to checkboxes (if checked cell equals true, if not cell equals false)... if I check or uncheck my check boxes, which changes column P values, it does not do the formating. Is this because of the checkboxes? Thanks again... "Tom Ogilvy" wrote: I interpreted your requirement for someone manually making an entry in column P. If that isn't the requirement, try this revision: Private Sub Worksheet_Change(ByVal Target As Range) If Target.Value = True Then Cells(Target.Row, "G").Resize(1, 22).Interior.ColorIndex = 15 If Target.Value = False Then Cells(Target.Row, "G").Resize(1, 22).Interior.ColorIndex = xlNone End If End Sub -- Regards, Tom Ogilvy "John" wrote in message ... Tom, thanks for the reply. Nothing changes when my cell value changes (it changes to true of false)... here is the code... Private Sub Worksheet_Change(ByVal Target As Range) If Target.Column = 16 Then If Target.Value = "true" Then Cells(Target.Row, "G").Resize(1, 22).Interior.ColorIndex = 15 If Target.Value = "false" Then Cells(Target.Row, "G").Resize(1, 22).Interior.ColorIndex = 0 End If End Sub "Tom Ogilvy" wrote: Private Sub Worksheet_Change(ByVal Target As Range) if Target.Column = 16 then Cells(Target.Row,"G").Resize(1,22).Interior.ColorI ndex = 3 End if End Sub Right click on the sheet tab and select view Code. -- Regards, Tom Ogilvy "John" wrote in message ... I want to color a row from column G to AB if range("p" & currentrow) value changes... currentrow being the row of the cell value that was changed... how do select the row of the cell that was changed? Thanks for the help |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Are the checkboxes from the control toolbox toolbar or from the forms
toolbar? Are all the checkboxes located in the same column and positioned over the row you want to format? If the checkboxes are from the control toolbox toolbar, are you familiar with class modules? In any event, are there formulas that refer to the cells in column P that would cause a recalculate if their value changed? -- Regards, Tom Ogilvy "John" wrote in message ... Tom I appreciate the help, that works. However, my true and false are linked to checkboxes (if checked cell equals true, if not cell equals false)... if I check or uncheck my check boxes, which changes column P values, it does not do the formating. Is this because of the checkboxes? Thanks again... "Tom Ogilvy" wrote: I interpreted your requirement for someone manually making an entry in column P. If that isn't the requirement, try this revision: Private Sub Worksheet_Change(ByVal Target As Range) If Target.Value = True Then Cells(Target.Row, "G").Resize(1, 22).Interior.ColorIndex = 15 If Target.Value = False Then Cells(Target.Row, "G").Resize(1, 22).Interior.ColorIndex = xlNone End If End Sub -- Regards, Tom Ogilvy "John" wrote in message ... Tom, thanks for the reply. Nothing changes when my cell value changes (it changes to true of false)... here is the code... Private Sub Worksheet_Change(ByVal Target As Range) If Target.Column = 16 Then If Target.Value = "true" Then Cells(Target.Row, "G").Resize(1, 22).Interior.ColorIndex = 15 If Target.Value = "false" Then Cells(Target.Row, "G").Resize(1, 22).Interior.ColorIndex = 0 End If End Sub "Tom Ogilvy" wrote: Private Sub Worksheet_Change(ByVal Target As Range) if Target.Column = 16 then Cells(Target.Row,"G").Resize(1,22).Interior.ColorI ndex = 3 End if End Sub Right click on the sheet tab and select view Code. -- Regards, Tom Ogilvy "John" wrote in message ... I want to color a row from column G to AB if range("p" & currentrow) value changes... currentrow being the row of the cell value that was changed... how do select the row of the cell that was changed? Thanks for the help |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Lock Cell Format - Allow copy and paste of data without format change | Excel Worksheet Functions | |||
Changing the cell format doesn't change existing cell content | Excel Discussion (Misc queries) | |||
Change Currency Format of Cell based on another Cell | Excel Worksheet Functions | |||
Can cell format come from and change with reference cell format | Excel Discussion (Misc queries) | |||
find word in a cell then change cell format | Excel Programming |