Zero value

C

chequer

Is there a way to get Excel to recognise a leading zero as a digit.
Ie. Enter the number 0645 and multiply the first digits, 06, by a given
number.
IE.. ( 06 * 2 ) = 12

The only way I can do it, is to, Format column *A* as 0000, then enter
0645 at *A1* and at *B1* the formula [ *=MID(A1+10000000,3,2)*2* ]

I know I could just enter the number as 645 and the formula,
*=Left(A1,1)*2*, but I have a need to enter it with a leading zero.
 
T

Tom Ogilvy

Enter it as
'0645

using a leading single quote.

this will not show the single quote and will store the number as a string
including the leading zero.

=Left(A1,2)*2
 
C

chequer

Tom said:
Enter it as
'0645

using a leading single quote.

this will not show the single quote and will store the number as a
string
including the leading zero.

=Left(A1,2)*2

--
Regards,
Tom Ogilvy

in
message news:[email protected]...
Is there a way to get Excel to recognise a leading zero as a digit.
Ie. Enter the number 0645 and multiply the first digits, 06, by a given
number.
IE.. ( 06 * 2 ) = 12

The only way I can do it, is to, Format column *A* as 0000, then enter
0645 at *A1* and at *B1* the formula [ *=MID(A1+10000000,3,2)*2* ]

I know I could just enter the number as 645 and the formula,
*=Left(A1,1)*2*, but I have a need to enter it with a leading zero.


--
chequer

Old battler
------------------------------------------------------------------------
chequer's Profile:
http://www.excelforum.com/member.php?action=getinfo&userid=36908
View this thread: http://www.excelforum.com/showthread.php?threadid=566482

Thank Tom,
This works fine but I should have made myself clearer.
I am converting a 'basic' program I wrote on an old Amstrad to an Excel
program.
This is for our Pigeon racing club members to use when I kick the
bucket..
As none of the members know nothing about computers I have to make it
as user friendly as possible.
The program which calculates the pigeons race velocities, require
entering a lot of times and converting them to seconds.
To simplify entering these times, they are entered as::
ie 6:45am as *0645*, 7:45pm as *1945*, 2:40:54pm as *144054*.
This does away with having to use the colon separator.
The formulas I use for the conversions are:
*0645* =MID(A1+100000,3,2)*3600+RIGHT(A1,2)*60
*1945* =LEFT(A2,2)*3600+RIGHT(A2,2)*60
*144054*
=MID(A3+10000000,3,2)*3600+MID(A3+10000000,5,2)*60+RIGHT(A3,2)
This also does away with them having to *remember* to enter the
apostrophe before entering times earlier than 10:00am, as you
suggested.
 

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

Similar Threads


Top