Murray Brown

asked on

# Excel VBA- fastest way to find the row number of a cell with a certain value in a range's column

Hi

Given a certain range, what is the fastest way to find the row number of a cell with a certain value in column 2 ?

Given a certain range, what is the fastest way to find the row number of a cell with a certain value in column 2 ?

ASKER CERTIFIED SOLUTION

membership

This solution is only available to members.

To access this solution, you must be a member of Experts Exchange.

ASKER

Thanks very much

If the value is not found, the function returns -1.

Open in new window

If the range C2:C5 contains the values 1,3,5,7 then the first call in the test subroutine will return 4 (the absolute row) and the second will return -1.