View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
John[_88_] John[_88_] is offline
external usenet poster
 
Posts: 205
Default find cells in a range which equal a specific value

Hi Keith,

Try something like this (untested):

Dim myRange As Range
Dim oCell As Cell

For Each oCell In myRange.Cells
If oCell.Value < "" Then
Select Case oCell.Value
Case 1
'Do something if the cell = 1
Case 150
'Do something else if the cell = 150
'Add as many Cases as you need
End Select
End If
Next oCell

Best regards

John

"Keith Piggott" <Keith wrote in message
...
I am trying to allocate a value to a mixed range of values ie 1100 may be
made up of 10 different values