N
NDBC
I have id tags that when scanned turn up in excel in the following format
The actual id number is always numbers no letters has 16 spaces in the format
000 000000000000. Nearly always it turns up with the > sign in front but not
always.
I use the following code to get rid of any excess text
ID = Mid(Target, WorksheetFunction.Search(" ", Target) - 3, 16)
The target is dim as range
I then have to use the id number to search through 2 columns of id numbers
and find the associated rider team number. Column headings are like this
Team number Rider1 Tag id Rider2 tag id
100 982 000140555698 982 000140555612
101 982 000140555816 982 000140555836
etc
To find the address of the cell where the scanned id tag is I use
Set RiderCell = Sheet22.Range("b4:c804").Find(Target, , xlValues)
then to find the team number
Team = Sheet22.Cells(RiderCell.Row, 1)
This works well for the few scanned id tags that don't have the > in front
of the number but any id's that come in like >982 000140555698 then it
doesn't work for some reason. I have checked the mid statement and it seems
to be doing the job.
Is there a way I can set this up so that it will work for both possible
scanned inputs.
Thanks
982 000140555698 or 982 000140555612
The actual id number is always numbers no letters has 16 spaces in the format
000 000000000000. Nearly always it turns up with the > sign in front but not
always.
I use the following code to get rid of any excess text
ID = Mid(Target, WorksheetFunction.Search(" ", Target) - 3, 16)
The target is dim as range
I then have to use the id number to search through 2 columns of id numbers
and find the associated rider team number. Column headings are like this
Team number Rider1 Tag id Rider2 tag id
100 982 000140555698 982 000140555612
101 982 000140555816 982 000140555836
etc
To find the address of the cell where the scanned id tag is I use
Set RiderCell = Sheet22.Range("b4:c804").Find(Target, , xlValues)
then to find the team number
Team = Sheet22.Cells(RiderCell.Row, 1)
This works well for the few scanned id tags that don't have the > in front
of the number but any id's that come in like >982 000140555698 then it
doesn't work for some reason. I have checked the mid statement and it seems
to be doing the job.
Is there a way I can set this up so that it will work for both possible
scanned inputs.
Thanks