View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Carrie_Loos via OfficeKB.com Carrie_Loos via OfficeKB.com is offline
external usenet poster
 
Posts: 116
Default cell is merged and contains "something"

I am having trouble with this piece of code. I can't seem to make these two
variable work together. If I remove the "And Like "*me*" portion of the If
statement then the code will change the color correctly in the merged cells
but I can't seem to get the 'And' piece to work. Can anyone help?

Sub Customer_Colors()

For Each c In Range("B8:IT500")

If c.MergeCells = True And c.MergeCells Like "*something*" Then
c.Interior.ColorIndex = 4

Next

End Sub

Thanks
Carrie

--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...mming/200801/1