ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Custom Number Format... (https://www.excelbanter.com/excel-worksheet-functions/9912-custom-number-format.html)

whitmore0112

Custom Number Format...
 
I have a number/text that I want to apply a custom format to, but am not sure
if it is possible. The number/text starts as 12K52E1, and I would like to
apply a number format to always change it to 12K-52-E1. Is it possible?

Peo Sjoblom

Not possible to manipulate text like that using a number format,
if there were only numbers one could use something like

00"K"-00-"E"0

I suspect though that you get this text strings so one way assuming that the
numbers of characters always are 7 you can use a help formula


=LEFT(A1,3)&"-"&MID(A1,4,2)&"-"&RIGHT(A1,2)


then copy and paste special as values in place


Regards,

Peo Sjoblom

"whitmore0112" wrote:

I have a number/text that I want to apply a custom format to, but am not sure
if it is possible. The number/text starts as 12K52E1, and I would like to
apply a number format to always change it to 12K-52-E1. Is it possible?


Ken Wright

You can't apply a format like that to text, it has to be numeric. You can
always use formula to create that data in that format if that is acceptable
though, or even have a bit of code run through and change it all.

--
Regards
Ken....................... Microsoft MVP - Excel
Sys Spec - Win XP Pro / XL 97/00/02/03

----------------------------------------------------------------------------
It's easier to beg forgiveness than ask permission :-)
----------------------------------------------------------------------------

"whitmore0112" wrote in message
...
I have a number/text that I want to apply a custom format to, but am not

sure
if it is possible. The number/text starts as 12K52E1, and I would like to
apply a number format to always change it to 12K-52-E1. Is it possible?





All times are GMT +1. The time now is 09:14 AM.

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