Hi,
I have script that returns row number after string match, but i want value of that cell
like table
name id
JJ 1
JK 7
in this case if i search JK it returns 2 not 7 and i want 7
please see the code below
======================
Dim Input
Input = InputBox("Please enter Name")
Set objExcel = CreateObject("Excel.Application")
objExcel.Visible = False
strExcelFile = "C:\Users\Desktop\test1.xlsx"
objExcel.Workbooks.Open strExcelFile
strValue = Input
lngRowNum = objExcel.Match(strValue, objExcel.ActiveSheet.Range("A1:A4"), 0)
MsgBox lngRowNum
Please suggest me where i need to change the code...
Bookmarks