Formating Telephone Numbers

Feb 9, 2005

Is it possible to format cells so that inputed tel. numbers are all have the same format and not just appear the same, regardless of how they were typed in?
i need it so the column can be sorded by phone #.

View 9 Replies


ADVERTISEMENT

Removing Telephone Numbers From A Cell?

Jun 1, 2013

I have a limited amount of VBA knowledge. My limited knowledge is based on solving my problems by looking at the answers already on this site and trying to adapt it to my needs. Here goes:

I import a list of address and telephone numbers (100+) into excel. example - Cell A1 contains "10 downing street, whitehall, london, SW1A 2AA 01234 567890", sometimes there is another space after the number, sometimes there is no telephone number. I want to remove the telephone number at the end if it is there. Have searched the forums have have come up with the follow solution:

1. import list to column A
2. copy and paste Trim to column B
3. copy values in column B and paste to column A
4. delete column B
5. remove the end numbers
6. copy and paste Trim to column B
7. copy values in column B and paste to column A
8. delete column B
9. remove the end numbers

It looks like this in code:

Sub testa()

'select (=TRIM(A1)) formula and paste to sheet
Sheets("Formulas").Select
Columns("B:B").Select
Application.CutCopyMode = False
Selection.Copy
Sheets("Sheet4").Select
Columns("B:B").Select
ActiveSheet.Paste

[Code]...

'copy values of column B to Column A and delete column B

Columns("B:B").Select
Selection.Copy
Columns("A:A").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Columns("B:B").Select
Application.CutCopyMode = False
Selection.ClearContents
Range("A1").Select

[Code]...

'copy values of column B to Column A and delete column B

Columns("B:B").Select
Selection.Copy
Columns("A:A").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Columns("B:B").Select
Application.CutCopyMode = False
Selection.ClearContents
Range("A1").Select
End Sub

I know this is a long winded way around (still chuffed I worked it out by myself though!). If I merge all the macros into one marco it continually loops and deletes everything in the cells and I have to press escape to stop it.

My questions are:

1. Why, when I merge all the macros doesnt it work the same as individual macros? (I would like to know for future reference).
2. Its there a better way to remove the telephone numbers?

View 3 Replies View Related

Insert Spaces In Telephone Numbers

Aug 24, 2007

I have a column that contains all telephone numbers without any spaces - 01234567890

I need to have at least one space inserted anywhere in the number i.e. 0 1234567890 or 01234 567890.

View 8 Replies View Related

Cleanup Telephone Numbers Have Some Text Data?

Aug 16, 2014

I have some cells which contain telephone number and some text data. They look like this.

(713) 555-4600 (Work)
(713) 555-4620 (Home)
(832) 555-4610 (John's Phone)

I need to strip out the text data and just display the phone number as follows

(713) 555-4600
(713) 555-4620
(832) 555-4610

View 4 Replies View Related

Inserting State Names Based On Telephone Numbers

Oct 22, 2007

I have a large data set (excel file), of "Names", "Phone Numbers", and i need to sort this based on the States that correspond with the Phone numbers. The states currently do not exist in the spreadsheet, so my current problem is trying to insert those states into the spreadsheet.

There are over 100 area codes in the data set, so i'll likely have to write a large "If" statement in VB to run through them all, but that shouldnt be a problem.

NAME, PHONE, STATE
Bleh, 555-555-5555, =ChkState(B2)

I've been playing around with the VB Stuff in Excel and this is what i've come up with for trying to insert the State field

Function ChkState(pVal As String) As Long

Dim AreaCode As String
Dim StateAbrv As String

AreaCode = Left(pVal, 3)

If AreaCode = "201" Then
StateAbrv = "Test201"
ElseIf AreaCode = "203" Then
StateAbrv = "Test203"
ElseIf AreaCode = "555" Then
StateAbrv = "Test555"
Else
StateAbrv = "0"
End If
MsgBox StateAbrv
End Function

I'm fairly new to this VB stuff, my main problem stems from trying to insert the "StateAbrv" back into the Cell for the spreadsheet.

View 9 Replies View Related

Conditional Formating With Even Numbers

May 8, 2009

i have 2 columns the first is the transaction number and second column is the description

i want to make that all even transaction number will highlight the whole row... how do i make that with conditional formatting? or are there other alternatives?

View 8 Replies View Related

Conditional Formating On Track Winning Lottery Numbers

Mar 1, 2007

Tracking winning lottery numbers using conditional formating on a worksheet.CF only allows 3 formats I need 10 is there a way around this.In cell B2 I choose Conditional Formatting from the Format menu.I select Formula is from the drop down menu,and enter the formula =COUNTIF($N$2:$S$2,B2)>0 Then I hit OK.I then click on the Painter button on the toolbar and apply this formatting to the rest of the lotto numbers.I can do this 2 other times but i need it to work 10 more times,if there is no way around this, is this formula possible in VBA and how do I enter it.

View 9 Replies View Related

Conditional Formating To Find Largest Numbers In A Selection

Mar 14, 2007

I am trying to create a macro that works with a range of cells and identify the five largest numbers in the range. The following are the steps.

1. I select a range of cells and run the marco.

2. The macro will identify the largest number in the selection and make the cell color red.

3. Then it will find the cell with next largest number and turn the cell orange...and so on till the 5th largest number.

View 9 Replies View Related

Telephone Dialing Code

Jan 2, 2008

This has definitely been done before, but I am not sure if it has been done through Excel/VBA.

I have a 9 or 10 digit telephone number, preceded by a zero and what I want to do is get Excel to figure out the combinations of text characters that will allow me to have a text phone number.

For Example:
0-800-43573375 is the same as 0-800-HELPDESK

View 9 Replies View Related

Auto Formating

Dec 1, 2008

I run an online store where all the product details are handled by a .CSV file and naturally all the information has to be exact or it won't work at all especially UPC codes and product codes. However whenever I open the .CSV file to edit anything it auto formats several bit of information including several UPCs and product codes that begin with one or more 0's. This among many other problem I have had are all caused by excel's auto formating "tool" and I find it of absolutely no use. Is there any way at all to disable this "tool" so it will stop messing with my data every time I need to make a product change? (I have tried using the '0 trick but when I save the file and open it again later all the '0s are gone again)

I am running Excel 2007 on Windows Vista SP1

View 7 Replies View Related

MOD+ROW Conditional Formating

May 18, 2009

I have an excel document that has one columb (I) of cells that changes color depending on a specific date (columb h) . The cells that have conditional formating to change the row color based on where it is ( =MOD(ROW(),2)=1), stays blank and the proper color until columb A is filled in. The others show up red. How would I code/format the lines that aren't included in the conditional formating to always show white when no value is entered in columb a.

View 9 Replies View Related

Formating Cells Or Row?.

Jun 23, 2009

can i format the cells that i have made grey for this photo to automatic put : between numbers i put in like the time.example if i would put in a cell 1200 than it would be like 12:00 is that possible i have been through all the time formats in the format cells options but i always get this result ###.

the other ? is can i take the S away when i have formated cells to show kilograms so it would be like 550 kg instead of 550 kgs ?

View 5 Replies View Related

Formating Cell

Mar 7, 2007

I need to replace a "." with a "," to stay in the right format, by using VBA.

if i make a macro to do it, it will work for almost all cells but for a few it doens't work!
Then, if i select the cell with mouse and replace "." with a "," it works normaly.

My question is why it doesn't work for a few fields if all the data have the same format?

View 11 Replies View Related

Formating Cells

Feb 24, 2007

I have h26 and h27 both can generate a number
if h26 is a number i need f26 to formate in dollors
if h27 is a number i need f26 to be general formate

in the cells h26 and h27 they will already be in that format how can i get them to go to f26 like that

******** ******************** ************************************************************************>Microsoft Excel - PROTOTYPE2207.xls___Running: xl2002 XP : OS = Windows XP (F)ile (E)dit (V)iew (I)nsert (O)ptions (T)ools (D)ata (W)indow (H)elp (A)boutF26=
EFGH26s1*$1.0027***1Weekly Stats*
[HtmlMaker 2.42] To see the formula in the cells just click on the cells hyperlink or click the Name box
PLEASE DO NOT QUOTE THIS TABLE IMAGE ON SAME PAGE! OTHEWISE, ERROR OF JavaScript OCCUR.

View 9 Replies View Related

Conidtional Formating

Aug 23, 2007

I have excel 2000 and conditional formating has only 3 options. Is it possible to use a formula so that if a critria matches, the cell chagnes colour?

View 9 Replies View Related

Formating Formula

Feb 10, 2009

i have the following table.

A1A2A3A4116747001169470011706300117075011707501170710511707100

the formatting which is in A1 I want that in A4 I will automatically appear like above (at the moment i do this formating manaually)

View 10 Replies View Related

Address Formating

Oct 20, 2009

I have a column with addresses and I need to separate it into columns, the main problem is that sometimes the listing has house number sometimes it does not some time it has town but, some time it does not and the post code is not separated from the county - if no house number then that column is to remain empty.

Eg; (rows 1-2-3)

Bull Corner, Rainham Road South, Dagenham, Essex RM10 8YT
Bernard Road, Romford, Essex RM7 0HX
420, Eastern Avenue, Gants Hill, Ilford, Essex IG2 6NS

Need to enter them into the right columns:

House number - Road - Town - County - Post Code

View 9 Replies View Related

Conditional Formating A Row

Jul 20, 2007

how to use the conditional format tool, but now the company i designed the spreadsheet for, wants me to implement a change. I'm attacking a copy of the spreadsheet so you can see the problem more easily. Now what I've been asked todo is the following.

1. When the stock quantity (Column H) goes below the re-order level (Column K), they want the entire row to change font colour from blue to red. Now I know how i can change the colour of one cell, like ive done in the example, but I'm not sure how to change the entire row colour. If this can be done with conditioning formating then great, but if not then i'm stuck, and relying on your generosity in helping me out.

View 2 Replies View Related

Using Vlookup In A Conditonal Formating

Feb 4, 2010

I am using this formula in a Conditional Formatting

=VLOOKUP(G1,Dies5PE,1)>0

Where "Dies5PE" = a named range

it doesnt work.. if I change the"G1" to a "$G1", everything in the range changes to the conditional format.

View 5 Replies View Related

More Than 3 Conditional Formating Per Cell

Oct 31, 2008

I have a large X-Y-axis table with about 200 entries in it. There are 6 different entries possible. I now want to give each possible entry in this table a color for making it easier to read.

I could write a formula in conditional formating, so that it works for 3 colors. The problem is now that i can make this only for 3 different colors in conditional formating of excel. Is there a possibility for making this for 6 colors?

View 2 Replies View Related

Sumproduct With Condition Formating

Nov 5, 2008

I have two columns from which criteria must be satisifed. column A denotes gender (m or f) and column B denotes a number of points. I want to sum those males who achieve >4 in one cell and those females who achieve >4 in another cell.

View 3 Replies View Related

Set Up Formula In Conditional Formating

Dec 29, 2009

I want to set up formula in conditional formating so that when:

$AF6 = "CA" the color is red
or
if $AF6 = ("GA","ME","PR") then the color is blue

what I came up with is Condition 1
= ($AF6 ="ca") [which will turn the cell red]
Condition 2
="OR($AF6={""GA"",""ME"",""PR""}, "")" [which doesn't do anything]

View 2 Replies View Related

How To Check Text Formating

Mar 29, 2007

is there a formula that i can use to check if a text in a cell is in bold?

i.e something like :

=isblock(A2)

to return true if the text in A2 is in bold

View 9 Replies View Related

Formating Data Sheet

Feb 22, 2008

i have a list of about 50,000 songs

my layout is like so...

artist1 song1 disc#
artist1 song2 disc#
artist1 song3 disc#
artist2 song1... you get it.

what i want to do is reformat it so it looks like this

artist1
song1 disc#
song2 disc#
song3 disc#
artist2
song1 disc#

so the artist and song could be in the same column with the song indented or if someone knows another way that works too.

View 9 Replies View Related

Conditional Formating For 6 Conditions

Jun 4, 2008

I have a spreadsheet

B4:B193 - place
D4:D193 - value
F4:F193 - name

H4:H193 - place
J4:J193 - value
L4:L193 - name

N9:N93 - place
P9:P93 - value
Q9:Q93 - name

What i am looking for is this:

If value in cell in column D is >=90 then relevant cell in column B, D and F background green

If value in cell in column D is less =80 then relevant cell in column B, D, and F background dark blue

If value in cell in column D is less =70 then relevant cell in column B, D, and F background light blue

If value in cell in column D is less =50 then relevant cell in column B, D, and F background orange

If value in cell in column D is less

View 9 Replies View Related

Conditional Formating In 2003

Sep 11, 2008

This thread:

http://www.mrexcel.com/forum/showthr...itional+format

Asks almost exactly the question I have, but I can't make heads or tails out of the answers, I'm guessing becasue I have Excel 2003 and not 2007 as mentioned in the replies.

In column "A" I have a number; column "B" the formula =A1 copied on down and in column "C" either a 1 or 2 or a 3.

If the number in column "C" is a 1 then the font in the same cell in Column "B" should be black, 2 Blue and 3 Red.

I'm thinking this should be very simple, but so far it's not turning out that way. )-:

View 9 Replies View Related

Formating With A Date And Text

Jan 9, 2009

I would like to format a cell so when i enter a six digit number, such as 123456 it would appear starting with a QW then the year, month and day in the format of yymmdd and them the six digit number so it would appear as QWYYMMDD123456, or since today is 01/09/09 is would be QW090109123456

I would like the yymmdd field to be taken from the main location where the date is entered and the QW can be in another field so when I go to another blank field and enter a six digit number, for example 123456 it will be changed to QW090108123456. I hope you can follow this and that I explained it in a matter that is understood.

View 9 Replies View Related

Conditional Formating By Date

Oct 20, 2009

I have been trying to perform a conditional format using a date value.

Example:
Condition 1 =IF(L14

View 9 Replies View Related

Formating Multiple Sheets

Feb 12, 2010

Can this code be simplified? I currently have this code repeated 15 times, I need to color the ranges yellow and then unlock them. So for now I am repeating the code below for range ("C19:N26") and then 14 other ranges.

And if you have suggestions on cleaning up the code below please let me know, I would like to know the proper/most efficient way to write code.

Sub FormatingBudgetFiles()

'Colors each Forecast cell yellow that the end user can change

Dim ws As Worksheet

For Each ws In ActiveWorkbook.Worksheets
ws.Activate
With ActiveWindow
Range("c14:k14").Select
End With

View 9 Replies View Related

Conditional Formating On Graphs

Jun 10, 2006

if its possible to run conditional formating on graphs, I can do this fine on the actual data

i.e. Have a bar chart with a number of bars all the same colour and just wanted to have the bars change to red if they drop below a certain percentage.

only running excel 2000

View 6 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved