Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default How do I change a merged Cells background color

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
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
Checkbox to change background color, font color and remove/ add bo Sara Excel Discussion (Misc queries) 2 May 1st 23 11:43 AM
Range name title appearing as background in merged cells John Excel Discussion (Misc queries) 0 December 11th 09 03:55 PM
change background color in cells Joe Excel Worksheet Functions 4 November 6th 07 11:20 PM
how can I conditionally change font color, or background color? MOHA Excel Worksheet Functions 3 August 21st 06 06:57 PM
Change font and background color of several cells based on result of a formula Zenaida Excel Discussion (Misc queries) 2 April 27th 06 06:46 PM


All times are GMT +1. The time now is 02:40 AM.

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"