View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Gary Keramidas[_4_] Gary Keramidas[_4_] is offline
external usenet poster
 
Posts: 226
Default Matching strings with a pattern

didn't give much information but maybe some kind of loop with

With Range("A1")
If InStr(1, .Value, " - ") 1 Then
..Interior.ColorIndex = 19
End If
End With



--


Gary Keramidas
Excel 2003


"Raj" wrote in message
...
Hi,

I have cells containing strings of the type "Mumbai - 400078" and
"Belgaum - 590011" with the following pattern:
Alphabetic string followed by space followed by hyphen followed by
space and then a numeric string. I want to fill such cells with a
color (interior.colorindex)? How do I identify such cells to the code?

Thanks in Advance for the help.

Regards,
Raj