• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Find in table equal to the value of a cell

S P P

Member
Find in column 1 of table1 equal to A2
 

Attachments

  • SPP Find in table equal to the value of a cell.xlsm
    28.8 KB · Views: 2
OK so it's found; what do you want to do with the information? Tell the user the address of the cell? Highlight the cell(s)? Return information from the same row? What?
 
I made an example on plan2
 

Attachments

  • SPP Find in table equal to the value of a cell1.xlsm
    41 KB · Views: 2
See button on Plan2
 

Attachments

  • Chandoo48226SPP Find in table equal to the value of a cell1.xlsm
    41.6 KB · Views: 1
Beacuse on Plan1 you have a proper Excel table called Tabela1, you can use another code:
Code:
Sub findnumber2()
With Range("Tabela1").ListObject
  FindS = .Parent.Range("A2").Value
  Set Rng = .ListColumns(1).DataBodyRange.find(What:=FindS, LookIn:=xlValues, LookAt:=xlWhole, MatchCase:=False, searchformat:=False)
  If Not Rng Is Nothing Then
    Application.Goto Rng, True
  Else
    MsgBox "Não Encontrado"
  End If
End With
End Sub
This is run by clicking the button on that sheet in the attached.
 

Attachments

  • Chandoo48226SPP Find in table equal to the value of a cell2.xlsm
    44 KB · Views: 5
Back
Top