Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   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

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
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Marcelo
 
Posts: n/a
Default how do i get the mid function to work with a zero

try to format the cell as a text.

regards from Brazil
Marcelo

"garbold" escreveu:

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

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

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.

"garbold" wrote in message
...
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



  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
tony h
 
Posts: n/a
Default how do i get the mid function to work with a zero


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

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
tony h
 
Posts: n/a
Default how do i get the mid function to work with a zero


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



  #6   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

Hi thanks have tried that and now it works thanks again

"Marcelo" wrote:

try to format the cell as a text.

regards from Brazil
Marcelo

"garbold" escreveu:

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

  #7   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

Hi..thanks for the post it now works...thanks anyway

"Andy" wrote:

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.

"garbold" wrote in message
...
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




  #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


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
why won't EDATE function work in Excel? Machead in a Microsoft World Excel Worksheet Functions 2 March 22nd 06 04:35 PM
What would cause the sum function in a column not to work? Heidi Excel Discussion (Misc queries) 1 March 21st 06 10:41 PM
HOW DO YOU MAKE FORECAST FUNCTION WORK IN EXCEL? Sharon T Excel Worksheet Functions 1 October 7th 05 03:31 PM
Can't get SUM function to work in Excel 2000 Ros M New Users to Excel 4 September 22nd 05 05:54 PM
Automatically up date time in a cell Mark Excel Discussion (Misc queries) 5 May 12th 05 12:26 AM


All times are GMT +1. The time now is 05:58 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"