Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

detect a # in the middle.... 2

Status
Not open for further replies.

natedeia

Technical User
May 8, 2001
365
US
dont know if this would be vb or better as a conditiona b/c i do not know where to start with this one especially.
is it possible to detect the fifth ( or fourth, third, etc) digit in a # (8759 6 5687)it is not seperated like that but i want to be able to search a column and.....well this is part of a bigger solution that i have posted on, so going to take it one step at a time. thanks!

i am in the situation to be forced to learn vb for excel just because management do not want to get off their a#% to get our vb expert in here to create this stuff.

 
hey i just checked out your last vs and that was a great idea, still having access or even taking a look at the ones already flagged.
 
do you know why this new one lets you run it with the Macro list box by hitting run but when you run the Macro from the keyboard shortcut it gives a RunTimeError 1004???
 
Zathras,nevermind about the last post, i was going to test it on different levels, lower and higher, how can i change the # of characters it is trying to match up? i thought that i could but i dont know how.
 
Hi natedeia, I've not carried on with this thread as Zathras's solution was exactly the sort of thing I would have suggested. I use the same concept to try and find potential name matches in list of patients.
Consider the THEFT_THRESHHOLD as a measure of the quality of match between one number and another. The lower the number, the higher number of potential matches but more false matches; the higher the number, the less potential matches but a greater chance of catching a 'baddy'. In my experience the only way to determine the right value is to 'suck it and see' - play with the constant until it seems right. Remember that techniques like this are only tools to help and you need to balance the availability of resources against the benefits obtained.
It's a shame that the number is a SSN. In the UK, patients are given an NHS (National Health Service) number which includes a modulus check as I described - this makes it easy to check for invalid entries. But problems like this keep IT people in business!
Simon Rouse
 
i agree Simon, and thanks so much again Zathras, but sure until there is a way such as finger print scanning everywhere or no checks then there will always be certain kinds of fraud. adventually i will figure out a way to put a control # in to determine how many of the trues there can be.
 
Not VBA-related, but worth noting that there are a number of websites that check whether a SSN is valid and active (i.e. the person hasn't died). Some, like , even do a limited number of checks each day for free.

VBAjedi [swords]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top