Match2

Matching by two values at the same time in two columns
Just like Match the function, but with two cells instead of 1
Searches for two values in two columns and return the row number if both found

Has custom condition to check if length of Val2 is greater than a number instead of matching full string (using Val2 with LenGT).
Also, if Val2 starts with LenGE to test if Val2 is greater than or equal a number.

Edit 2025-02-03: Redone to add some error-checking and
Edit 2025-01-26: Fixing activesheet issue in workbook(wb)

CodeFunctionName What is this?

Public

Tested

Original Work

Access is limited.

Login here using your Linkedin account. to see or download code.

No registration, not another password to remember, login using your Linkedin account and have access to all public codes in Mydev.net

Linkedin Login

Parameters

Val1, Col1, Val2, Col2, Optional WB, Optional Shee, Optional StartFromRow

Examples

Match2("ANmar", "A", "LenGT32", "B", ,"DBSheet")
To return the row number if column A is ANmar and length of value in column B is greater than 32

Permanenet link

Statistics

Views 3,229

Downloads 1,292

IDs

CodeID
DB ID