Hello Dave,
Here is an alternative method if you need to search a large range of cells quickly. The macro examines only cells that contain true strings and loops through each byte of the string. The compare is speeded up by using an API call to place the bytes of the string (cell contents) into an array. The bytes are then compared to the "-" and " " characters. There is a match if the count of spaces and dashes equal the length of string. You would need to insert whatever code you want to run at this point in the macro (its marked in green).
To Use the Macro:
FastCheck "A1:Z300"
Replace "A1:Z300" with the range you want to check
Sincerely,
Leith Ross
Bookmarks