Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22
Default custom format cells

Hi

I would like to use the concatenate function on a group of 4 cells, which
are filled with numbers. The first cell will have 4 digits, and the next
cells will have 2 digits, 2 digits, and 4 digits. I would like to format the
cell so that a 12 digit number comes up when concatenated. However, if for
example I enter 0001 in cell #4, the 0's are dropped when concatenated and
thus have a 9 digit number. How can I do this.

Thanks.

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 644
Default custom format cells

Assuming everything is stored as text and you want a number:
=VALUE(VALUE(A1)&VALUE(A2)&VALUE(A3)&VALUE(A4))

Charles

Kaby wrote:
Hi

I would like to use the concatenate function on a group of 4 cells, which
are filled with numbers. The first cell will have 4 digits, and the next
cells will have 2 digits, 2 digits, and 4 digits. I would like to format the
cell so that a 12 digit number comes up when concatenated. However, if for
example I enter 0001 in cell #4, the 0's are dropped when concatenated and
thus have a 9 digit number. How can I do this.

Thanks.


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,593
Default custom format cells

=TEXT(A1,"0000")&TEXT(B1,"00")&TEXT(C1,"00")&TEXT( D1,"0000")

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"Kaby" wrote in message
...
Hi

I would like to use the concatenate function on a group of 4 cells, which
are filled with numbers. The first cell will have 4 digits, and the next
cells will have 2 digits, 2 digits, and 4 digits. I would like to format

the
cell so that a 12 digit number comes up when concatenated. However, if

for
example I enter 0001 in cell #4, the 0's are dropped when concatenated and
thus have a 9 digit number. How can I do this.

Thanks.



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default custom format cells

=concatenate(text(A1,"0000"),text(A2,"00"),text(A3 ,"00"),text(A4,"0000"))

--
Regards,
Tom Ogilvy


"Kaby" wrote:

Hi

I would like to use the concatenate function on a group of 4 cells, which
are filled with numbers. The first cell will have 4 digits, and the next
cells will have 2 digits, 2 digits, and 4 digits. I would like to format the
cell so that a 12 digit number comes up when concatenated. However, if for
example I enter 0001 in cell #4, the 0's are dropped when concatenated and
thus have a 9 digit number. How can I do this.

Thanks.

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22
Default custom format cells

Hi,

Since I didn't have my cells stored as text but as custom numbers, the
concatenate text funcion works beautifully.

Thanks a bunch.

"Tom Ogilvy" wrote:

=concatenate(text(A1,"0000"),text(A2,"00"),text(A3 ,"00"),text(A4,"0000"))

--
Regards,
Tom Ogilvy


"Kaby" wrote:

Hi

I would like to use the concatenate function on a group of 4 cells, which
are filled with numbers. The first cell will have 4 digits, and the next
cells will have 2 digits, 2 digits, and 4 digits. I would like to format the
cell so that a 12 digit number comes up when concatenated. However, if for
example I enter 0001 in cell #4, the 0's are dropped when concatenated and
thus have a 9 digit number. How can I do this.

Thanks.

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Custom Format for cells NeedExcelHelp Excel Discussion (Misc queries) 2 September 30th 09 07:26 PM
Format Cells - Custom Emece Excel Discussion (Misc queries) 3 August 5th 08 11:29 PM
Format Cells - Custom PatM Excel Worksheet Functions 1 May 22nd 08 04:47 PM
Custom format for cells Liz Excel Discussion (Misc queries) 4 December 11th 07 11:08 AM
Custom format for cells Jack Excel Discussion (Misc queries) 4 January 12th 06 01:21 PM


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

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"