I am screen scraping data from our legacy system. In our system a provider enters a score into a template freetext textbox (which I cannot change). The scraped data can take any of the below formats:
2
2.5
2-2.5
2.0-2.5
na
The problem arises when a provider enters some free text after the score:
2-2.5 no headaches
2-2.5 (no headaches)
2-2.5 **no headaches**
etc
I have used InStr and IfNumeric in the past to validate and truncate the string, but I am at a lost when the beginning of the string could be any letter or character and the string itself could contain a hyphen. The possibility is that there may be thousands of rows of data to manually fix one at a time.
Eventually I will do a calculation on all the scores. If the string is a range then take the average of two values first. This part of the code is working.
Any suggestions. Thank you in advance.
You don't know what you don't know...
2
2.5
2-2.5
2.0-2.5
na
The problem arises when a provider enters some free text after the score:
2-2.5 no headaches
2-2.5 (no headaches)
2-2.5 **no headaches**
etc
I have used InStr and IfNumeric in the past to validate and truncate the string, but I am at a lost when the beginning of the string could be any letter or character and the string itself could contain a hyphen. The possibility is that there may be thousands of rows of data to manually fix one at a time.
Eventually I will do a calculation on all the scores. If the string is a range then take the average of two values first. This part of the code is working.
Any suggestions. Thank you in advance.
You don't know what you don't know...