View Single Post
  #6 (permalink)  
Old October 25th, 2004, 04:57 AM
SiliconFuRy SiliconFuRy is offline
Authorized User
 
Join Date: Oct 2004
Location: Edinburgh, Scotland, United Kingdom.
Posts: 84
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to SiliconFuRy
Default

As luck has it, as soon as i posted that, i found a solution 2 minutes later (been searching for something on this for a couple of days), heres an even simpler solution:

Sub DoOnSelection()
Dim oCell As Range
For Each oCell In Selection
  If oCell.Value < 5 Then
  oCell.Interior.ColorIndex = 3
  End If

Next
End Sub

which does almsot exactly as my C-syntax PDL styled code does.

Next question, how do i do Cell.Value = "*shoes*"

where that would return

"too many shoes"
"shoes galore"
"some shoes are too bigbarr"

Reply With Quote