PC Review


Reply
Thread Tools Rate Thread

How do I change a merged Cells background color

 
 
rich
Guest
Posts: n/a
 
      25th Oct 2006
Hi,

I have wrote a script that validates the values of different cells.
When it detects a problem it changes the background colour of the
offending cell.

To reset the background colour back to it's original colour I've added
this script to the worksheet:

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
With Target.Interior
If .ColorIndex = 7 Then
.ColorIndex = 36
End If
End With
End Sub

This works on the cells that aren't merged but doesn't on those that
are. How do I change the color ot the merged cells?

Thanks in advance

Rich

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Change the background color of cells once it being edited shawn lee Microsoft Excel Programming 2 16th Sep 2008 08:31 AM
change background color in cells =?Utf-8?B?Sm9l?= Microsoft Excel Worksheet Functions 4 6th Nov 2007 11:20 PM
I want to change the background color of cells, if value is a square root. George C. Microsoft Excel Programming 1 9th Dec 2006 06:29 PM
Change font and background color of several cells based on result of a formula Zenaida Microsoft Excel Misc 2 27th Apr 2006 06:46 PM
Need to loop thru cells and change background color Ian Wolstenholme Microsoft Excel Discussion 6 8th Feb 2005 11:07 PM


Features
 

Advertising
 

Newsgroups
 


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