View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Don Guillett Don Guillett is offline
external usenet poster
 
Posts: 10,124
Default use VBA color the cells

try
Sub colorifU()
For Each c In Selection
If UCase(Right(c, 1)) = "U" Then c.Interior.ColorIndex = 6
Next c
End Sub

--
Don Guillett
SalesAid Software

"Sarah" wrote in message
...
Hi,

I have an excel file, user enters numbers or letters. I like to have a
macro to color all the cells with the letter "U" at the end. Please help.

Thanks so much,

Sarah