Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have some mixed data formatting in a column, SSN. Some of it is in the
format Numeric, then formatted 000-00-0000, and some of it is in the Format "123-45-6789". I need to make it all alike -- how do I proceed? -- Dave Temping with Staffmark in Rock Hill, SC |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Sorry, not too clear. Try again:
Some cells contain data like 13640681, formatted Special, SSN. Some files contain data like 013-64-0681. These variants may occur for the same individual. I need to sort the data to bring all of any individual's records together, hence I need to convert all of one kind or the other to a format that makes them all formatted the same. I hope that's a bit clearer! -- Dave Temping with Staffmark in Rock Hill, SC "Dave Birley" wrote: I have some mixed data formatting in a column, SSN. Some of it is in the format Numeric, then formatted 000-00-0000, and some of it is in the Format "123-45-6789". I need to make it all alike -- how do I proceed? -- Dave Temping with Staffmark in Rock Hill, SC |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
<Some files -- of course I meant "Some CELLS" (sheesh, getting too old for
this <g!) -- Dave Temping with Staffmark in Rock Hill, SC "Dave Birley" wrote: Sorry, not too clear. Try again: Some cells contain data like 13640681, formatted Special, SSN. Some files contain data like 013-64-0681. These variants may occur for the same individual. I need to sort the data to bring all of any individual's records together, hence I need to convert all of one kind or the other to a format that makes them all formatted the same. I hope that's a bit clearer! -- Dave Temping with Staffmark in Rock Hill, SC "Dave Birley" wrote: I have some mixed data formatting in a column, SSN. Some of it is in the format Numeric, then formatted 000-00-0000, and some of it is in the Format "123-45-6789". I need to make it all alike -- how do I proceed? -- Dave Temping with Staffmark in Rock Hill, SC |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
This macro will convert a group of mixed text and numeric SSN# into pure text:
Sub social() Dim s As String For Each r In Selection s = r.Text r.Clear r.NumberFormat = "@" r.Value = s Next End Sub just Select & run. -- Gary''s Student - gsnu200719 "Dave Birley" wrote: I have some mixed data formatting in a column, SSN. Some of it is in the format Numeric, then formatted 000-00-0000, and some of it is in the Format "123-45-6789". I need to make it all alike -- how do I proceed? -- Dave Temping with Staffmark in Rock Hill, SC |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Magnificent -- worked like a bleedin' charm!
-- Dave Temping with Staffmark in Rock Hill, SC "Gary''s Student" wrote: This macro will convert a group of mixed text and numeric SSN# into pure text: Sub social() Dim s As String For Each r In Selection s = r.Text r.Clear r.NumberFormat = "@" r.Value = s Next End Sub just Select & run. -- Gary''s Student - gsnu200719 "Dave Birley" wrote: I have some mixed data formatting in a column, SSN. Some of it is in the format Numeric, then formatted 000-00-0000, and some of it is in the Format "123-45-6789". I need to make it all alike -- how do I proceed? -- Dave Temping with Staffmark in Rock Hill, SC |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
You are welcome. This is, unfortunately, a common real-world problem.
-- Gary''s Student - gsnu200719 "Dave Birley" wrote: Magnificent -- worked like a bleedin' charm! -- Dave Temping with Staffmark in Rock Hill, SC "Gary''s Student" wrote: This macro will convert a group of mixed text and numeric SSN# into pure text: Sub social() Dim s As String For Each r In Selection s = r.Text r.Clear r.NumberFormat = "@" r.Value = s Next End Sub just Select & run. -- Gary''s Student - gsnu200719 "Dave Birley" wrote: I have some mixed data formatting in a column, SSN. Some of it is in the format Numeric, then formatted 000-00-0000, and some of it is in the Format "123-45-6789". I need to make it all alike -- how do I proceed? -- Dave Temping with Staffmark in Rock Hill, SC |
#7
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
So, here it is over 2 months later, and I think it is time for me to expand
my "Thanks". I now have a hidden WB called "Public Macros", and a slightly modified version of your "Social" macro is the most frequently used member of that file's citizens. Here is my modest little tweak: Public Sub Social() ' ' Social Macro ' Dim s As String For Each R In Range("C3", Range("C3").End(xlDown)) With R s = .Text z = .Font.Size c = .Interior.ColorIndex .Clear .NumberFormat = "000-00-0000" .Font.Size = z .Value = s With .Interior .ColorIndex = c .Pattern = xlSolid End With End With Next This macro has made cross-WB searching a whole gang better! Cannot thank you enough. End Sub -- Dave Temping with Staffmark in Rock Hill, SC "Gary''s Student" wrote: This macro will convert a group of mixed text and numeric SSN# into pure text: Sub social() Dim s As String For Each r In Selection s = r.Text r.Clear r.NumberFormat = "@" r.Value = s Next End Sub just Select & run. -- Gary''s Student - gsnu200719 "Dave Birley" wrote: I have some mixed data formatting in a column, SSN. Some of it is in the format Numeric, then formatted 000-00-0000, and some of it is in the Format "123-45-6789". I need to make it all alike -- how do I proceed? -- Dave Temping with Staffmark in Rock Hill, SC |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Replace #VALUE! with contents of cell?? | Excel Worksheet Functions | |||
REPLACE PART OF CELL WITH FORMATTED TEXT | Excel Worksheet Functions | |||
I need help writing a macro to replace cell contents. (new to VB) | Excel Programming | |||
replace cell contents | Excel Worksheet Functions | |||
How do I replace the contents of a cell with its value instead of. | Excel Worksheet Functions |