Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 4
Default Color a cell When Change Is Made

I have used the following:

Private Sub Worksheet_Change(ByVal Target As Range)
Target.Interior.ColorIndex = 8
End Sub

But what I really want to do is to color the entire row in one color and the
changed cell in another.

Any code out there please?

TIA
Zorro


  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 222
Default Color a cell When Change Is Made

Add the line: Target.EntireRow.Interior.ColorIndex = 3


"Zorro" wrote:

I have used the following:

Private Sub Worksheet_Change(ByVal Target As Range)
Target.Interior.ColorIndex = 8
End Sub

But what I really want to do is to color the entire row in one color and the
changed cell in another.

Any code out there please?

TIA
Zorro



  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 149
Default Color a cell When Change Is Made

Private Sub Worksheet_Change(ByVal Target As Range)
Target.EntireRow.Interior.ColorIndex = 37
Target.Interior.ColorIndex = 8
End Sub

HTH,


"Zorro" wrote in message
.uk...
I have used the following:

Private Sub Worksheet_Change(ByVal Target As Range)
Target.Interior.ColorIndex = 8
End Sub

But what I really want to do is to color the entire row in one color and
the changed cell in another.

Any code out there please?

TIA
Zorro



  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 7,247
Default Color a cell When Change Is Made

I would add a safeguard to ensure that Target is only one row tall.

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Rows.Count = 1 Then
Target.EntireRow.Interior.ColorIndex = 37
Target.Interior.ColorIndex = 8
End If
End Sub


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com
(email address is on the web site)

"George Nicholson" wrote in message
...
Private Sub Worksheet_Change(ByVal Target As Range)
Target.EntireRow.Interior.ColorIndex = 37
Target.Interior.ColorIndex = 8
End Sub

HTH,


"Zorro" wrote in message
.uk...
I have used the following:

Private Sub Worksheet_Change(ByVal Target As Range)
Target.Interior.ColorIndex = 8
End Sub

But what I really want to do is to color the entire row in one color and
the changed cell in another.

Any code out there please?

TIA
Zorro





  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 4
Default Color a cell When Change Is Made

Thanks for that. One problem though. I can only highlight one change per row
using the code below. Is there a way to highlight a number of cells on the
same row as they are changed. They may not neccessarily be contiguous.

Private Sub Worksheet_Change(ByVal Target As Range)
Target.EntireRow.Interior.ColorIndex = 3
Target.Interior.ColorIndex = 8
End Sub

Cheers
Zorro


"bigwheel" wrote in message
...
Add the line: Target.EntireRow.Interior.ColorIndex = 3


"Zorro" wrote:

I have used the following:

Private Sub Worksheet_Change(ByVal Target As Range)
Target.Interior.ColorIndex = 8
End Sub

But what I really want to do is to color the entire row in one color and
the
changed cell in another.

Any code out there please?

TIA
Zorro







  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 903
Default Color a cell When Change Is Made

If the coloring is only to help identify the cell during
the time that it is selected see Chip's
RowLiner addin
http://www.cpearson.com/excel/RowLiner.htm

"Chip Pearson"
I would add a safeguard to ensure that Target is only one row tall.

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Rows.Count = 1 Then
Target.EntireRow.Interior.ColorIndex = 37
Target.Interior.ColorIndex = 8
End If
End Sub




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
Using an offset formula for the reference in a relative reference Cuda Excel Worksheet Functions 6 November 15th 06 05:12 PM
How to change a tab name with cell reference and formula? Jared Excel Worksheet Functions 3 June 12th 06 09:41 PM
How to change the value of a cell when a condition is satisfied, but not otherwise? benzi_k_ahamed Excel Discussion (Misc queries) 0 January 11th 06 11:31 AM
change cell shading whenever contents different from previous cell zooeyhallne Excel Discussion (Misc queries) 3 June 6th 05 09:59 PM
conditional cell shading when a change occurs zooeyhall Excel Discussion (Misc queries) 1 June 6th 05 05:14 PM


All times are GMT +1. The time now is 10:14 AM.

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

About Us

"It's about Microsoft Excel"