• Announcements

    • xper

      MSFN Sponsorship and AdBlockers!   07/10/2016

      Dear members, MSFN is made available via subscriptions, donations and advertising revenue. The use of ad-blocking software hurts the site. Please disable ad-blocking software or set an exception for MSFN. Alternatively, become a site sponsor and ads will be disabled automatically and by subscribing you get other sponsor benefits.
kbdavis

How to keep number formats when you "hard return" in a single

3 posts in this topic

I am using excel 2010, and was wondering if it is possible to create a custom format for phone #'s in excel that will allow me to put two phone numbers in a single cell, separated by a "hard enter" (ALT + ENTER), thus formatting two entirely separate phone numbers.

Example:

5551234567
9875554321

which would automatically format to:

(555) 123-4567
(987) 555-4321

The code block above represents one single cell.

### edited to show reasoning ###

I am trying to automatically sort a bunch of information alphabetically, which is why I can only use one, single cell..

Edited by kbdavis
0

Share this post


Link to post
Share on other sites

I don't think there is a way, if not by using a VBA function.

Something *like*:

http://www.mrexcel.com/forum/excel-questions/342753-insert-alt-enter-into-cell-column-defined-comma-counted.html

Once said that, the reasoning:

### edited to show reasoning ###

I am trying to automatically sort a bunch of information alphabetically, which is why I can only use one, single cell..

may not be "exahaustive enough". :unsure:

Why not using on the same rows more columns, one for each telephone number?

Those could be the "rightmost" columns (possibly also hidden or "closed") and you could have as last right column of the area you print (or whatever) something with a formula like:

http://www.mrexcel.com/forum/excel-questions/298732-formula-insert-alt-enter-into-cell.html

Say that you have:

A1 Name

B1 Surname

C1 Telephones

A2 John

B2 Doe

C2 =TEXT(Y2;"(000) 000-0000")&CHAR(10)&TEXT(Z2;"(000) 000-0000")<- this will result as the phone numbers on two lines and formatted as you like.

Y2 5551234567

Z2 9875554321

jaclaz

0

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.