Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2
Default how to add decimal to beginning of imported number

when importing fixed width text file, all leading zeros are dropped. Is
there a way to add a decimal point to the beginning of a number?
i.e.
text file data = 0004
data = 0125
preferred outcome in excel
00.04
01.25
all custom formatting i have tried puts decimal to the left of number
any ideas
thanks
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,058
Default how to add decimal to beginning of imported number

First import your data as text, so A1 contains 0004

Then in B1 enter:
=LEFT(A1,2) & "." & RIGHT(A1,2) and copy down

--
Gary''s Student - gsnu200765


"ssetech" wrote:

when importing fixed width text file, all leading zeros are dropped. Is
there a way to add a decimal point to the beginning of a number?
i.e.
text file data = 0004
data = 0125
preferred outcome in excel
00.04
01.25
all custom formatting i have tried puts decimal to the left of number
any ideas
thanks

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,047
Default how to add decimal to beginning of imported number

if you need the result as number you can use:

assuming 0004 is on a1 on b1 use and 0125 on a2

=abs(a1)/100 copy it down

so excel will return 0.04 and 1.25

hth
--
regards from Brazil
Thanks in advance for your feedback.
Marcelo



"ssetech" escreveu:

when importing fixed width text file, all leading zeros are dropped. Is
there a way to add a decimal point to the beginning of a number?
i.e.
text file data = 0004
data = 0125
preferred outcome in excel
00.04
01.25
all custom formatting i have tried puts decimal to the left of number
any ideas
thanks

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
add decimal to beginning of number ssetech Excel Discussion (Misc queries) 1 January 23rd 08 02:41 AM
How do I keep the 0 at the beginning of a number, ex. 090? linds.hope New Users to Excel 1 October 30th 07 08:59 PM
Converting 2-place decimal value to floating point decimal number with leading zero Kermit Piper Excel Discussion (Misc queries) 3 March 18th 06 06:20 PM
convert imported data with . separator for decimal into , separato kris Excel Discussion (Misc queries) 1 September 8th 05 11:34 PM
Zero at the beginning of a number Zeros at the front of numbers Excel Discussion (Misc queries) 4 April 11th 05 02:58 PM


All times are GMT +1. The time now is 04:21 PM.

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

About Us

"It's about Microsoft Excel"