ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   excell number formatting (https://www.excelbanter.com/excel-worksheet-functions/139828-excell-number-formatting.html)

FRISBIE RGW

excell number formatting
 
I am trying to take 3 cells and merge the information into one cell while
changing the formatting.

enter 23, 45, 670 into 3 cells. Have a return of 023-045-670 in one cell.
I need to use this # as if it were 23045670 and be able to sort and add to
it. I know how to mege the cell it's the return of 023 from 23 that seems
most problematic.

BoniM

excell number formatting
 
If you want the number including dashes (with original numbers in A1,B1, and
C1):
=TEXT(A1,"000")&"-"&TEXT(B1,"000")&"-"&TEXT(C1,"000")
Without dashes:
=TEXT(A1,"000")&TEXT(B1,"000")&TEXT(C1,"000")

"FRISBIE RGW" wrote:

I am trying to take 3 cells and merge the information into one cell while
changing the formatting.

enter 23, 45, 670 into 3 cells. Have a return of 023-045-670 in one cell.
I need to use this # as if it were 23045670 and be able to sort and add to
it. I know how to mege the cell it's the return of 023 from 23 that seems
most problematic.


Duke Carey

excell number formatting
 
=text(cell1,"000")&"-"&text(cell2,"000")&"-"&text(cell3,"000")

This will be a text value. You can use it as a numeric value by

=VALUE(SUBSTITUTE(text value,"-",""))

"FRISBIE RGW" wrote:

I am trying to take 3 cells and merge the information into one cell while
changing the formatting.

enter 23, 45, 670 into 3 cells. Have a return of 023-045-670 in one cell.
I need to use this # as if it were 23045670 and be able to sort and add to
it. I know how to mege the cell it's the return of 023 from 23 that seems
most problematic.


Ron Rosenfeld

excell number formatting
 
On Fri, 20 Apr 2007 11:12:01 -0700, FRISBIE RGW <FRISBIE
wrote:

I am trying to take 3 cells and merge the information into one cell while
changing the formatting.

enter 23, 45, 670 into 3 cells. Have a return of 023-045-670 in one cell.
I need to use this # as if it were 23045670 and be able to sort and add to
it. I know how to mege the cell it's the return of 023 from 23 that seems
most problematic.


To combine the values, you can use this formula:

=SUMPRODUCT(A1:A3,{1000000;1000;1})

If the original values are in a ROW rather than a COLUMN, use comma separators
instead of semi-colons in the array constant.

Format the cell as:

Format/Cell/Number/Custom Type: 000-000-000


--ron


All times are GMT +1. The time now is 09:31 PM.

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