Hi!
I see you've got several replies but here's another option.
If your codes are always the same length:
999-000-00089101 = 16
232-987-00123456 = 16
AND, if the portion of the code you need to extract NEVER
starts with 0:
=IF(--MID(A1,11,1)=0,RIGHT(A1,5),RIGHT(A1,6))
Returns:
999-000-00089101 = 89101
232-987-00123456 = 123456
Biff
-----Original Message-----
Thanks Biff,
The data from one program comes through as follows:
89101
123456
From the program that contains the ID's I use the right
function on they
come through as follow with the last 6 digits
representing the inventory code
999-000-00089101
232-987-00123456
The right function column returns me similar numbers to
that from the first
database, but to get all codes I have to lookup 6 numbers
which means my 5
digit codes have a 0 in front which I haven't found a way
of getting rid of.
I couldn't figure out a way of formatting this, and drew
a blank on other
ways around it.Any ideas for things to try out?
Cheers,
Sue
"Biff" wrote:
Hi!
What type of characters make up the entire string of
inventory codes?
Can you post a good representative sample (several) of
what these codes look like?
Biff
-----Original Message-----
Hi there,
I have a worksheet I have a right function which looks
up
the last 5 digits
in a cell. These digits represent the inventory code
for
individual inventory
items.
My problem is that sometimes these inventory codes are
6
digits long and
sometimes they are 5.
I can look up the last 6 digits and get a 0 infront of
the 5 digit codes,
but I want to compare the data to data from another
computer program which
won't work if the codes aren't represented in the same
way. Can anyone think
of a way to look up the last 5 or 6 digits? Could this
be
done with an IF
combined with a RIGHT?
Cheers,
Sue
.
.
|