Created
June 7, 2021 19:22
-
-
Save Se7enSquared/2209398251188b7b75988f5ffbc248d1 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Function ValueInTable(ByVal column_number As Long, ByVal tbl As ListObject, ByVal LookupValue As String) As Boolean | |
Dim FoundCell As Range | |
'Attempt to find value in Table's first Column | |
On Error Resume Next | |
Set FoundCell = tbl.DataBodyRange.Columns(column_number).Find(LookupValue, LookAt:=xlWhole) | |
On Error GoTo 0 | |
'Return Table Row number if value is found | |
If Not FoundCell Is Nothing Then | |
ValueInTable = True | |
Else | |
ValueInTable = False | |
End If | |
End Function |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment