ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Format is lost when number changed to text (https://www.excelbanter.com/excel-worksheet-functions/143116-format-lost-when-number-changed-text.html)

Sarah (OGI)

Format is lost when number changed to text
 
I have a list of client references, in a 4-digit number format, in column A
of my worksheet. (In Format Cells, Custom was selected and '0000' entered in
as the type, i.e. 430 should appear as 0430.)

I have an additional column which changes each of the references into text,
using the formula below.

=IF(ISNUMBER(A13),FIXED(A13,0,TRUE),"")

However, when changed to text, the format is lost, i.e. '0430' will appear
as '430'. I need any additional zero's to be prefixed where necessary.

Is there any way to do this when the value is set as text?

JE McGimpsey

Format is lost when number changed to text
 
You could instead use

=IF(ISNUMBER(A13),TEXT(A13,"0000"),"")

In article ,
Sarah (OGI) wrote:

I have a list of client references, in a 4-digit number format, in column A
of my worksheet. (In Format Cells, Custom was selected and '0000' entered in
as the type, i.e. 430 should appear as 0430.)

I have an additional column which changes each of the references into text,
using the formula below.

=IF(ISNUMBER(A13),FIXED(A13,0,TRUE),"")

However, when changed to text, the format is lost, i.e. '0430' will appear
as '430'. I need any additional zero's to be prefixed where necessary.

Is there any way to do this when the value is set as text?


Sarah (OGI)

Format is lost when number changed to text
 
Thank you, that worked great!

"JE McGimpsey" wrote:

You could instead use

=IF(ISNUMBER(A13),TEXT(A13,"0000"),"")

In article ,
Sarah (OGI) wrote:

I have a list of client references, in a 4-digit number format, in column A
of my worksheet. (In Format Cells, Custom was selected and '0000' entered in
as the type, i.e. 430 should appear as 0430.)

I have an additional column which changes each of the references into text,
using the formula below.

=IF(ISNUMBER(A13),FIXED(A13,0,TRUE),"")

However, when changed to text, the format is lost, i.e. '0430' will appear
as '430'. I need any additional zero's to be prefixed where necessary.

Is there any way to do this when the value is set as text?




All times are GMT +1. The time now is 04:54 AM.

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