Jump to content

Welcome to MSFN Forum
Register now to gain access to all of our features. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, post status updates, manage your profile and so much more. This message will be removed once you have signed in.
Login to Account Create an Account


Photo

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

- - - - -

  • Please log in to reply
2 replies to this topic

#1
kbdavis

kbdavis

    Newbie

  • Member
  • 10 posts
  • OS:Windows 7 x64
  • Country: Country Flag
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, 26 April 2013 - 08:29 PM.



How to remove advertisement from MSFN

#2
kbdavis

kbdavis

    Newbie

  • Member
  • 10 posts
  • OS:Windows 7 x64
  • Country: Country Flag
BUMP

#3
jaclaz

jaclaz

    The Finder

  • Developer
  • 14,289 posts
  • OS:none specified
  • Country: Country Flag
I don't think there is a way, if not by using a VBA function.
Something *like*:
http://www.mrexcel.c...ma-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.c...-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 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users



How to remove advertisement from MSFN