Hi,
I have a spreadsheet where I am searching by break numbers (there is two kinds of break numbers: 5 digit ones and seven digit ones). I have a search engine at the top which searches through records for certain information and returns the rows with the according information. For the break numbers search, the user types in a number, and the search engine checks whether it is between two numbers, and then returns the rows where the number typed exists between the range. In my spreadsheet, if the user typed in 70032, the search engine would return all rows where that number exists:
C1 C2
R3: 70000 71000
R6: 70000 70500
However, because I am using the LEFT function, what the search engine is actually doing is the following:
C1 C2
R3: 70000 71000
R6: 70000 70500
R10: 7000001 7005000
It is returning the rows with the seven digit numbers as well. Is there any way to fix this issue, as in if a user typed in a five digit number, it would only return rows with five digit number?
This is the formula that I have so far in order to check whether a number is within a range (_G5 is the cell where user types in the number, and C1 and C2 are the columns which contain the lower and higher end of the range) :
AND(--(LEFT(C1, LEN(_G5)))<=_G5,--(LEFT(C2, LEN(_G5)))>=_G5
Any help would be appreciated.
Bookmarks