Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8
Default HELP IN A FORMULA

I have a column with two digit & three digit values e.g. 15, 777 which i want
to convert in four didgit value in next column as 0015, 0777.
Can i use a formula in the column that adds no of ZEROs in the value
bringing it in a FOUR DIGIT VALUE?

I hope my question makes sense. Any help will be greatly appreciated.
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,718
Default HELP IN A FORMULA

=TEXT(A1,"0000")

"Kashif" wrote:

I have a column with two digit & three digit values e.g. 15, 777 which i want
to convert in four didgit value in next column as 0015, 0777.
Can i use a formula in the column that adds no of ZEROs in the value
bringing it in a FOUR DIGIT VALUE?

I hope my question makes sense. Any help will be greatly appreciated.

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default HELP IN A FORMULA

You don't necessarily need a formula to do this. You can format the numbers
to *display* as 0015 and 0777.

Select the range of cells in question.
Goto FormatCellsNumber tab
Select: Custom
Under Type enter 0000
OK out

Note that Excel does not recognize leading zeros in numbers. The true
underlying values will still be 15 and 777.


--
Biff
Microsoft Excel MVP


"Kashif" wrote in message
...
I have a column with two digit & three digit values e.g. 15, 777 which i
want
to convert in four didgit value in next column as 0015, 0777.
Can i use a formula in the column that adds no of ZEROs in the value
bringing it in a FOUR DIGIT VALUE?

I hope my question makes sense. Any help will be greatly appreciated.



  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2
Default HELP IN A FORMULA

On Apr 1, 4:20 pm, "T. Valko" wrote:
You don't necessarily need a formula to do this. You can format the numbers
to *display* as 0015 and 0777.

Select the range of cells in question.
Goto FormatCellsNumber tab
Select: Custom
Under Type enter 0000
OK out

Note that Excel does not recognize leading zeros in numbers. The true
underlying values will still be 15 and 777.

--
Biff
Microsoft Excel MVP

"Kashif" wrote in message

...

I have a column with two digit & three digit values e.g. 15, 777 which i
want
to convert in four didgit value in next column as 0015, 0777.
Can i use a formula in the column that adds no of ZEROs in the value
bringing it in a FOUR DIGIT VALUE?


I hope my question makes sense. Any help will be greatly appreciated.



If you need to save the file in text formats (.csv or .txt ....) you
need to ensure the you keep the leading zero's and MS Excel is .


try IF( LEN(A1) = 2, "00" & A1, IF ( LEN(A1) = 3, "0" & A1,))

if you need more than 4 or 5 arguments, put this into a lookup table

Regards

Dougal Everingham
Senior Solutions Consultant

CONTROL PLAN REPORT ANALYSE IMPROVE

Australia
Level 10, 390 St Kilda Road, Melbourne VIC 3004


www.satorigroup.com.au

The Satori Group is an international consulting company specialising
in designing and implementing business improvement solutions

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8
Default HELP IN A FORMULA

Thanks a lot.

"Teethless mama" wrote:

=TEXT(A1,"0000")

"Kashif" wrote:

I have a column with two digit & three digit values e.g. 15, 777 which i want
to convert in four didgit value in next column as 0015, 0777.
Can i use a formula in the column that adds no of ZEROs in the value
bringing it in a FOUR DIGIT VALUE?

I hope my question makes sense. Any help will be greatly appreciated.

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



All times are GMT +1. The time now is 05:46 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"