Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Hi
The group previously helped me with a code that changes the colour of cells when the content is edited/changed and it works well Thank you ================================================== = Private Sub Workbook_SheetChange(ByVal Sh As Object, _ ByVal Target As Range) Target.Interior.ColorIndex = 8 End Sub ========== What I would like is to further enhance the code so that it DOESN'T make a colour change to inserted or deleted rows, but still allows the cell colour change when the content is edited/changed Is this possible ? -- Martin ©¿©¬ |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Private Sub Worksheet_Change(ByVal Target As Range)
With Target If .Cells.Count 1 Then Exit Sub If .Value < "" Then .Interior.ColorIndex = 8 End If End With End Sub Gord Dibben MS Excel MVP On Fri, 11 Apr 2008 17:21:37 GMT, Martin ©¿©¬ @nohere.net wrote: Hi The group previously helped me with a code that changes the colour of cells when the content is edited/changed and it works well Thank you ================================================= == Private Sub Workbook_SheetChange(ByVal Sh As Object, _ ByVal Target As Range) Target.Interior.ColorIndex = 8 End Sub ========== What I would like is to further enhance the code so that it DOESN'T make a colour change to inserted or deleted rows, but still allows the cell colour change when the content is edited/changed Is this possible ? |
#3
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
On Fri, 11 Apr 2008 15:24:15 -0700, Gord Dibben <gorddibbATshawDOTca
wrote: Private Sub Worksheet_Change(ByVal Target As Range) With Target If .Cells.Count 1 Then Exit Sub If .Value < "" Then .Interior.ColorIndex = 8 End If End With End Sub Thank you very much Gord This does a great job and saves a lot of extra work removing coloured lines the previous code left behind when inserting & deleting lines It's a great time saver -- Regards Martin ©¿©¬ |
#4
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Good to hear.
Thanks for the feedback. Gord On Sat, 12 Apr 2008 10:23:19 GMT, Martin ©¿©¬ @nohere.net wrote: On Fri, 11 Apr 2008 15:24:15 -0700, Gord Dibben <gorddibbATshawDOTca wrote: Private Sub Worksheet_Change(ByVal Target As Range) With Target If .Cells.Count 1 Then Exit Sub If .Value < "" Then .Interior.ColorIndex = 8 End If End With End Sub Thank you very much Gord This does a great job and saves a lot of extra work removing coloured lines the previous code left behind when inserting & deleting lines It's a great time saver |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
how do i change cell background colour depending on its content? | Excel Discussion (Misc queries) | |||
Change colour of cells when content is altered/changed | Excel Discussion (Misc queries) | |||
Change colour of data when changed | Excel Discussion (Misc queries) | |||
changing the colour of cells depending on the content. | Excel Discussion (Misc queries) | |||
How to change cell colour, X no days from inserted date in Excel? | Excel Worksheet Functions |