Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
It sounds like you have a data problem. there may be spaces or other
invisible characters in the cell with your numbers. Using Instr will avoid that problem, but causes the problem you originally posted about. If any stray characters are only the right side of your number, you can try If InStr(1, Trim(.Value), Trim(MyCriteria),vbTextCompare) = 1 Then rather than If InStr(1, .Value, MyCriteria) 0 Then -- Regards, Tom Ogilvy "Dean" wrote in message oups.com... Thanks Tom for the reply. I tried the suggested change but the code will not return any search results. The department numbers in column A are randomly scattered EG: column A 1 5 9 17 13 9 8 15 etc etc.... |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Need formula to return exact match | Excel Worksheet Functions | |||
Vlookup - return exact phrase | Excel Discussion (Misc queries) | |||
Need a function to return EXACT row number of a match | Excel Worksheet Functions | |||
Font color of exact function return in excel should be customize | Excel Programming | |||
Macro to compare values and return exact matching value | Excel Programming |