View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Pyball[_18_] Pyball[_18_] is offline
external usenet poster
 
Posts: 1
Default Programming to search for a cell with certain value

You can try something like this:

Private Sub CommandButton1_Click()
Dim rngTemp As Range
Dim strTemp As String

Set rngTemp = Sheets(1).Range("a1:d10")

With Sheets(1)
For Each cell In rngTemp
strTemp = cell
If strTemp = "test" Then
cell.Activate
MsgBox ActiveCell.Address
End If
Next cell
End With

End Sub

ms newsgrp wrote:
*I would like to be able to search for a cell with a certain strin
value?
Then get that cells postions. Is there a way to programmatically t
do that?
Thanks


--
Message posted from http://www.ExcelForum.com