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 ?

Microsoft Excel

View this solution by signing up for a free trial.

Members can start a 7-Day free trial and enjoy unlimited access to the platform.

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.