View Single Post
  #8   Report Post  
Posted to microsoft.public.excel.worksheet.functions
garbold
 
Posts: n/a
Default how do i get the mid function to work with a zero

Thanks tony..alls well now have tried info from ealier posts

regards Gary

"tony h" wrote:


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


--
tony h
------------------------------------------------------------------------
tony h's Profile: http://www.excelforum.com/member.php...o&userid=21074
View this thread: http://www.excelforum.com/showthread...hreadid=548914