View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
gajendra_vba[_4_] gajendra_vba[_4_] is offline
external usenet poster
 
Posts: 1
Default Want to select cells in B1:B19 which have same value as in cell A1


Hi,

You may try out this few lines code..mentioned as below:

Sub Search_Range()

For Each Cell In Range("b1:b19")
If Cell.Text = Range("a1").Text Then
MsgBox "Value found"
Cell.Select
End If
Next

End Sub


--
gajendra_vba
------------------------------------------------------------------------
gajendra_vba's Profile: http://www.excelforum.com/member.php...o&userid=29935
View this thread: http://www.excelforum.com/showthread...hreadid=496615