ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Format custom number: C-0000-L (https://www.excelbanter.com/excel-worksheet-functions/261141-format-custom-number-c-0000-l.html)

sonia

Format custom number: C-0000-L
 
Hi, I need to format a few cells in Excel to look like C-0000-L where "0000"
represents four numbers and "L" represents a letter.
I tried to do it in format - custom with C-0000-@ but it gives me an error
message.
I also tried to do it using the concatenate function but it doesn`t work.
Can anyone please help me?
Thanks!
--
Sonia

David Biddulph[_2_]

Format custom number: C-0000-L
 
Custom format "C-"0000"-L"
--
David Biddulph


"Sonia" wrote in message
...
Hi, I need to format a few cells in Excel to look like C-0000-L where
"0000"
represents four numbers and "L" represents a letter.
I tried to do it in format - custom with C-0000-@ but it gives me an error
message.
I also tried to do it using the concatenate function but it doesn`t work.
Can anyone please help me?
Thanks!
--
Sonia




sonia

Format custom number: C-0000-L
 
Thanks David but the problem is that the second letter is not the same in
every cell, it can bem C-1234-L or C-5678-R, ...
How can i make the formula accept a variable letter in the end?
Thanks!
--
Sonia


"David Biddulph" wrote:

Custom format "C-"0000"-L"
--
David Biddulph


"Sonia" wrote in message
...
Hi, I need to format a few cells in Excel to look like C-0000-L where
"0000"
represents four numbers and "L" represents a letter.
I tried to do it in format - custom with C-0000-@ but it gives me an error
message.
I also tried to do it using the concatenate function but it doesn`t work.
Can anyone please help me?
Thanks!
--
Sonia



.


TomPl

Format custom number: C-0000-L
 
Assuming the number is in cell A1 and the letter is in cell A2 then use this
formula:

="C-"&A1&"-"&A2

Not custom formatting.

Tom


All times are GMT +1. The time now is 06:11 AM.

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