#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 37
Default reformat columns

I am trying to find duplicate information in a spread sheet by using the
customer phone number. However, some phone numbers are formatted as
(563)345-678 and some are 563345678, so the conditional formatting is not
seeing this as a duplicate. Can someone please help?
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,696
Default reformat columns

if the format is phone number, find would locate them as 563345678. Do not
include the ()- in your search. If the phone numbers were entered as
(563)345-678 then you may want to do a find/replace for those characters and
remove them (Find ( replace with (leave blank), replace all.

"CandiC" wrote:

I am trying to find duplicate information in a spread sheet by using the
customer phone number. However, some phone numbers are formatted as
(563)345-678 and some are 563345678, so the conditional formatting is not
seeing this as a duplicate. Can someone please help?

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 7,247
Default reformat columns

If you don't want to alter the original data, insert a column next to
the original data, enter the following formula in the first data row
of the new column.

=SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(A1,"( ",""),")",""),"-",""),"
","")

and copy down as far as you need to go.

If you do want to change the original data, use

Sub FixPhone()
Dim R As Range
For Each R In Selection.Cells
R.Value = Replace( _
Replace( _
Replace( _
Replace(R.Value, _
"(", ""), ")", ""), "-", ""), " ", "")
Next R
End Sub

Select the cells to change and run the code.

Cordially,
Chip Pearson
Microsoft Most Valuable Professional
Excel Product Group, 1998 - 2009
Pearson Software Consulting, LLC
www.cpearson.com
(email on web site)



On Fri, 28 Aug 2009 10:58:01 -0700, CandiC
wrote:

I am trying to find duplicate information in a spread sheet by using the
customer phone number. However, some phone numbers are formatted as
(563)345-678 and some are 563345678, so the conditional formatting is not
seeing this as a duplicate. Can someone please help?

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
now() reformat in spreadsheet Ronan Excel Worksheet Functions 1 August 12th 08 08:34 PM
how to reformat numbers C.Loner Excel Discussion (Misc queries) 4 January 23rd 08 12:31 AM
reformat excel to letters in columns KENNETH WEINER Excel Discussion (Misc queries) 4 March 15th 07 03:51 PM
Reformat of a table [email protected] Excel Discussion (Misc queries) 2 December 7th 06 04:02 AM
reformat columns to rows? RickyDee Excel Worksheet Functions 1 October 11th 05 09:05 PM


All times are GMT +1. The time now is 08:26 AM.

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

About Us

"It's about Microsoft Excel"