InStr function that counts all the numbers in a cell that fall within a specified range
Posted on 2011-09-22
I have cells with values like: 19A, 20B, 26B,7C,20B,35D,14C, 21A,25C,26B,31A,17B and i need a macro that tells me how many occurrences there are of numbers between 20 and 25.
I could split the strings into separate cells, and then create a helper row that strips out the letters. and use this:
[DQ3] = WorksheetFunction.CountIf([DR5:EH5], ">19") - WorksheetFunction.CountIf([DR5:EH5], ">25")
but I really need to do it as an InStr without going trough all that.