Code: Select all
(\d{9,}|\d{6}-\d{3})
Code: Select all
userID := "123456789"
oWkBk := ComObjGet("C:\Users\Desktop\test.xlsx") ; get the workbook and create a handle
Loop, % oWkBk.Worksheets.Count
{
xlDown := -4121 ; constant to be used with the End method
, xlWhole := 1 ; constant to be used with the Find method
, col := oWkBk.Worksheets(A_Index).Range["A:CU"]
, sRng := oWkBk.Worksheets(A_Index).Range(col,col.End(xlDown))
if cell := sRng.Find[userID,,,xlWhole] ; if the pointer to a matching cell is found
MsgBox found %A_Index%
else
MsgBox not found %A_Index%
}
oWkBk := ""