Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
I have a column with numbers and text - I want to delete all numerical values
and leave the text intact. Any help would be greatly appreciated. |
#2
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Try this:
Select the range of cells to be impacted Press the [F5] key........a shortcut for <edit<go to Click [Special] Select: Formulas.....Uncheck: Text Click [OK] That will select all of the numeric values (and errors) Press the [Delete] key to erase the contents of the selected cells Is that something you can work with? -------------------------- Regards, Ron (XL2003, Win XP) Microsoft MVP (Excel) "thd3" wrote in message ... I have a column with numbers and text - I want to delete all numerical values and leave the text intact. Any help would be greatly appreciated. |
#3
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
You will need VBA for this:
Function stripNumbers(v) As String s = "" For i = 1 To Len(v) If Asc(Mid(v, i, 1)) < 48 Or Asc(Mid(v, i, 1)) 57 Then s = s & Mid(v, i, 1) End If Next i stripNumbers = s End Function Now, if A1 contains the mixed text, you can use =stripNumbers(A1) HTH Kostis Vezerides On Oct 16, 6:47 pm, thd3 wrote: I have a column with numbers and text - I want to delete all numerical values and leave the text intact. Any help would be greatly appreciated. |
#4
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Say column A has numbers in some cells and text in other cells. In B1 enter:
=IF(ISNUMBER(A1),"",A1) and copy down. Then copy column B and paste/special/value back onto column A -- Gary''s Student - gsnu200750 "thd3" wrote: I have a column with numbers and text - I want to delete all numerical values and leave the text intact. Any help would be greatly appreciated. |
#5
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Oops,
I just realized, seeing Ron's solution and rereading the OP that I gave an answer to another problem. Please follow Ron's suggestion. Or use an extra column with either =ISNUMBER(A2) =ISTEXT(A2) And filter accordingly on TRUE or FALSE HTH Kostis On Oct 16, 7:11 pm, vezerid wrote: You will need VBA for this: Function stripNumbers(v) As String s = "" For i = 1 To Len(v) If Asc(Mid(v, i, 1)) < 48 Or Asc(Mid(v, i, 1)) 57 Then s = s & Mid(v, i, 1) End If Next i stripNumbers = s End Function Now, if A1 contains the mixed text, you can use =stripNumbers(A1) HTH Kostis Vezerides On Oct 16, 6:47 pm, thd3 wrote: I have a column with numbers and text - I want to delete all numerical values and leave the text intact. Any help would be greatly appreciated. |
#6
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Ron - it looks like it should work but I keep getting "no cells found" - The
cells I am looking for look like xxxxxxxxx, 131414265, xxxxxxxx - I want to simply delete the numbers. thanks "Ron Coderre" wrote: Try this: Select the range of cells to be impacted Press the [F5] key........a shortcut for <edit<go to Click [Special] Select: Formulas.....Uncheck: Text Click [OK] That will select all of the numeric values (and errors) Press the [Delete] key to erase the contents of the selected cells Is that something you can work with? -------------------------- Regards, Ron (XL2003, Win XP) Microsoft MVP (Excel) "thd3" wrote in message ... I have a column with numbers and text - I want to delete all numerical values and leave the text intact. Any help would be greatly appreciated. |
#7
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
I need more information.....
Are you saying that one cell contains this kind of text?: xxxxxxxxx, 131414265, xxxxxxxx and you want to adjust it to contain (all in the same cell): xxxxxxxxx, , xxxxxxxx or is your situation different? -------------------------- Regards, Ron (XL2003, Win XP) Microsoft MVP (Excel) "thd3" wrote in message ... Ron - it looks like it should work but I keep getting "no cells found" - The cells I am looking for look like xxxxxxxxx, 131414265, xxxxxxxx - I want to simply delete the numbers. thanks "Ron Coderre" wrote: Try this: Select the range of cells to be impacted Press the [F5] key........a shortcut for <edit<go to Click [Special] Select: Formulas.....Uncheck: Text Click [OK] That will select all of the numeric values (and errors) Press the [Delete] key to erase the contents of the selected cells Is that something you can work with? -------------------------- Regards, Ron (XL2003, Win XP) Microsoft MVP (Excel) "thd3" wrote in message ... I have a column with numbers and text - I want to delete all numerical values and leave the text intact. Any help would be greatly appreciated. |
#8
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Yes (ideally without the double commas).
"Ron Coderre" wrote: I need more information..... Are you saying that one cell contains this kind of text?: xxxxxxxxx, 131414265, xxxxxxxx and you want to adjust it to contain (all in the same cell): xxxxxxxxx, , xxxxxxxx or is your situation different? -------------------------- Regards, Ron (XL2003, Win XP) Microsoft MVP (Excel) "thd3" wrote in message ... Ron - it looks like it should work but I keep getting "no cells found" - The cells I am looking for look like xxxxxxxxx, 131414265, xxxxxxxx - I want to simply delete the numbers. thanks "Ron Coderre" wrote: Try this: Select the range of cells to be impacted Press the [F5] key........a shortcut for <edit<go to Click [Special] Select: Formulas.....Uncheck: Text Click [OK] That will select all of the numeric values (and errors) Press the [Delete] key to erase the contents of the selected cells Is that something you can work with? -------------------------- Regards, Ron (XL2003, Win XP) Microsoft MVP (Excel) "thd3" wrote in message ... I have a column with numbers and text - I want to delete all numerical values and leave the text intact. Any help would be greatly appreciated. |
#9
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Are your numbers always surrounded by commas like you showed? Can there be
more than one number in your text? Rick "thd3" wrote in message ... Yes (ideally without the double commas). "Ron Coderre" wrote: I need more information..... Are you saying that one cell contains this kind of text?: xxxxxxxxx, 131414265, xxxxxxxx and you want to adjust it to contain (all in the same cell): xxxxxxxxx, , xxxxxxxx or is your situation different? -------------------------- Regards, Ron (XL2003, Win XP) Microsoft MVP (Excel) "thd3" wrote in message ... Ron - it looks like it should work but I keep getting "no cells found" - The cells I am looking for look like xxxxxxxxx, 131414265, xxxxxxxx - I want to simply delete the numbers. thanks "Ron Coderre" wrote: Try this: Select the range of cells to be impacted Press the [F5] key........a shortcut for <edit<go to Click [Special] Select: Formulas.....Uncheck: Text Click [OK] That will select all of the numeric values (and errors) Press the [Delete] key to erase the contents of the selected cells Is that something you can work with? -------------------------- Regards, Ron (XL2003, Win XP) Microsoft MVP (Excel) "thd3" wrote in message ... I have a column with numbers and text - I want to delete all numerical values and leave the text intact. Any help would be greatly appreciated. |
#10
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Something different. Works on column A; change to suit and extract text to
column B. Option Explicit Sub sistence() Dim RegExp As Object, Collection As Object, RegMatch As Object Dim Myrange As Range, C As Range, Outstring As String Set RegExp = CreateObject("vbscript.RegExp") With RegExp .Global = True .Pattern = "(\D)" End With Set Myrange = Range("A1:A100")' Alter to suit For Each C In Myrange C.Select Outstring = "" Set Collection = RegExp.Execute(ActiveCell.Value) For Each RegMatch In Collection Outstring = Outstring & RegMatch Next ActiveCell.Offset(0, 1).Value = Outstring Next Set Collection = Nothing Set RegExp = Nothing Set Myrange = Nothing End Sub Mike "thd3" wrote: I have a column with numbers and text - I want to delete all numerical values and leave the text intact. Any help would be greatly appreciated. |
#11
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
If each cell ALWAYS contains ONLY 3 fields, separated by commas
AND you ALWAYS want to remove the middle field.... Try this: 1)Save the workbook! 2)Select the range of cells to be impacted 3)From the Excel Main Menu: <edit<replace Find what: ,*, Replace with: (leave this field blank) Click [Replace All] That will change this: xxxxxxxxx, 131414265, xxxxxxxx into this: xxxxxxxxx xxxxxxxx If that is NOT what you want.....<edit<UNDO Does that help? -------------------------- Regards, Ron (XL2003, Win XP) Microsoft MVP (Excel) "thd3" wrote in message ... Yes (ideally without the double commas). "Ron Coderre" wrote: I need more information..... Are you saying that one cell contains this kind of text?: xxxxxxxxx, 131414265, xxxxxxxx and you want to adjust it to contain (all in the same cell): xxxxxxxxx, , xxxxxxxx or is your situation different? -------------------------- Regards, Ron (XL2003, Win XP) Microsoft MVP (Excel) "thd3" wrote in message ... Ron - it looks like it should work but I keep getting "no cells found" - The cells I am looking for look like xxxxxxxxx, 131414265, xxxxxxxx - I want to simply delete the numbers. thanks "Ron Coderre" wrote: Try this: Select the range of cells to be impacted Press the [F5] key........a shortcut for <edit<go to Click [Special] Select: Formulas.....Uncheck: Text Click [OK] That will select all of the numeric values (and errors) Press the [Delete] key to erase the contents of the selected cells Is that something you can work with? -------------------------- Regards, Ron (XL2003, Win XP) Microsoft MVP (Excel) "thd3" wrote in message ... I have a column with numbers and text - I want to delete all numerical values and leave the text intact. Any help would be greatly appreciated. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How to delete cell values withour deleting cell formulae | Excel Discussion (Misc queries) | |||
Maintaining numerical order when deleting row | Excel Discussion (Misc queries) | |||
Adding numerical values based on multiple values in another column | Excel Worksheet Functions | |||
Macro Help Needed: Comparing cell values and deleting rows | Excel Discussion (Misc queries) | |||
Extract one numerical value from single cell with multiple values? | Excel Worksheet Functions |