ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   HELP IN A FORMULA (https://www.excelbanter.com/excel-worksheet-functions/181990-help-formula.html)

Kashif

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.

Teethless mama

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.


T. Valko

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.




[email protected]

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


Kashif

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.



All times are GMT +1. The time now is 10:22 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com