Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 80
Default Change colour of cells when content is altered/changed BUT NOT TO INSERTED OR DELETED ROWS

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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22,906
Default Change colour of cells when content is altered/changed BUT NOT TO INSERTED OR DELETED ROWS

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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 80
Default Change colour of cells when content is altered/changed BUT NOT TO INSERTED OR DELETED ROWS

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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22,906
Default Change colour of cells when content is altered/changed BUT NOT TO INSERTED OR DELETED ROWS

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
how do i change cell background colour depending on its content? demble Excel Discussion (Misc queries) 2 May 2nd 07 05:50 PM
Change colour of cells when content is altered/changed Martin ©¿©¬ [email protected] Excel Discussion (Misc queries) 8 December 8th 06 05:37 PM
Change colour of data when changed Martin ©¿©¬ @REMOVETHIS.plus.com Excel Discussion (Misc queries) 3 May 13th 06 10:37 AM
changing the colour of cells depending on the content. johnny.exe Excel Discussion (Misc queries) 3 January 26th 06 09:41 AM
How to change cell colour, X no days from inserted date in Excel? Bayvon Excel Worksheet Functions 0 October 14th 05 05:17 AM


All times are GMT +1. The time now is 09:09 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"