Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
kanye
 
Posts: n/a
Default Using LEFT, can excel produce the first 0's in a custom format?

I have a custom format (00000) on cell A1. The data is 00251. I have a
formula in B2 to read the first 3 digits in A1 (Left, A1, 3). How do I get
B2 to pick up the data 002 instead of 251? Excel won't read the preceding
0's.
  #2   Report Post  
Niek Otten
 
Posts: n/a
Default

=LEFT(TEXT(A1,"00000"),3)

--

Kind Regards,

Niek Otten

Microsoft MVP - Excel

"kanye" wrote in message
...
I have a custom format (00000) on cell A1. The data is 00251. I have a
formula in B2 to read the first 3 digits in A1 (Left, A1, 3). How do I
get
B2 to pick up the data 002 instead of 251? Excel won't read the preceding
0's.



  #3   Report Post  
Duke Carey
 
Posts: n/a
Default

The leading zeros aren't *really* there so far as values are concerned. Only
the illusion of leading zeros when you use a custom format

Try

=LEFT(TEXT(A1,"000000"),3)



"kanye" wrote:

I have a custom format (00000) on cell A1. The data is 00251. I have a
formula in B2 to read the first 3 digits in A1 (Left, A1, 3). How do I get
B2 to pick up the data 002 instead of 251? Excel won't read the preceding
0's.

  #4   Report Post  
Bob Phillips
 
Posts: n/a
Default

=TEXT(LEFT(A10,LEN(A10)-2),"000")

--

HTH

RP
(remove nothere from the email address if mailing direct)


"kanye" wrote in message
...
I have a custom format (00000) on cell A1. The data is 00251. I have a
formula in B2 to read the first 3 digits in A1 (Left, A1, 3). How do I

get
B2 to pick up the data 002 instead of 251? Excel won't read the preceding
0's.



  #5   Report Post  
kanye
 
Posts: n/a
Default

Thanks to you both.

"kanye" wrote:

I have a custom format (00000) on cell A1. The data is 00251. I have a
formula in B2 to read the first 3 digits in A1 (Left, A1, 3). How do I get
B2 to pick up the data 002 instead of 251? Excel won't read the preceding
0's.

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
Excel 2003 FAILS, but Excel 2000 SUCCEEDS ??? Richard Excel Discussion (Misc queries) 2 May 13th 23 11:46 AM
how to convert GETPIVOTDATA from excel 2000 to excel 2002... Need_help_on_excel Excel Worksheet Functions 1 March 15th 05 02:08 AM
In only Excel, my mouse behaves as if the left button is held dow. DanV Excel Discussion (Misc queries) 1 March 14th 05 08:35 AM
How do I produce a running Census report in Excel? Michellle M Excel Worksheet Functions 1 January 5th 05 05:22 PM
In Excel can I move the tabs to the left side of the workbook? kit Excel Worksheet Functions 1 December 6th 04 09:15 PM


All times are GMT +1. The time now is 10:19 AM.

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"