View Single Post
  #3   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 still having the same issue - any other ideas?

Per Jessen wrote:
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

[quoted text clipped - 17 lines]
--
Message posted via OfficeKB.comhttp://www.officekb.com/Uwe/Forums.aspx/excel-programming/200801/1


Hi Carrie

Try this

Sub Customer_Colors()
For Each c In Range("B7:IT50")
If c.MergeCells = True And c.Value Like "*something*" Then
c.Interior.ColorIndex = 4
Next
End Sub

Regards,

Per


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