how do i get the mid function to work with a zero

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi all

I am trying to extract numbers from a test string using the MID function,all
is well until the text string starts with a zero.This is then ignored and
uses the next available number.It is for a barcode generator so the zero is
required.

thanks
 
Hi
It works for me! It may be that the string is not text, but is a number with
a custom format to show the required number of digits.

Hope this helps.
 
There is not enough detail to determine what is going wrong. Can you
post the formulae or code that you are using.

My guess is that you have a number in a cell which is formatted 000000
(or however many zeros) rather than a text string. This is one way that
would give the results you observe.

If you use =MID(RIGHT("0000"&D1,4),1,1) where the 4 is the length of
the barcode you should be ok. The "0000" needs to be long enough to
cater for the maximum number of leading zeros

regards
 
There is not enough detail to determine what is going wrong. Can you
post the formulae or code that you are using.

My guess is that you have a number in a cell which is formatted 000000
(or however many zeros) rather than a text string. This is one way that
would give the results you observe.

If you use =MID(RIGHT("0000"&D1,4),1,1) where the 4 is the length of
the barcode you should be ok. The "0000" needs to be long enough to
cater for the maximum number of leading zeros

regards
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top