ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   how do I remove data from cells ex. (232)-555-1212 to 2325551212 (https://www.excelbanter.com/excel-discussion-misc-queries/94422-how-do-i-remove-data-cells-ex-232-555-1212-2325551212-a.html)

Russ

how do I remove data from cells ex. (232)-555-1212 to 2325551212
 
how do I remove data from cells ex. (232)-555-1212 to 2325551212

Bearacade

how do I remove data from cells ex. (232)-555-1212 to 2325551212
 

Function NumOnly(AnyVal As String)
Dim RegEx
Set RegEx = CreateObject("vbscript.regexp")
RegEx.Global = True
RegEx.Pattern = "[^\d\s]+"
KillNonNum = RegEx.Replace(AnyVal, "")
Set RegEx = Nothing
End Function

=NumOnly(A1)


--
Bearacade


------------------------------------------------------------------------
Bearacade's Profile: http://www.excelforum.com/member.php...o&userid=35016
View this thread: http://www.excelforum.com/showthread...hreadid=552748


Liz

how do I remove data from cells ex. (232)-555-1212 to 2325551212
 
I'm sure there's a real formula, but I use the find & replace feature. Put
the character to remove (one at a time) in the Find box, leave the replace
box empty, and replace all. You have to select the column you want to
remove them from.


"Russ" wrote in message
...
how do I remove data from cells ex. (232)-555-1212 to 2325551212




logan27371

how do I remove data from cells ex. (232)-555-1212 to 2325551212
 
That is a formatting issue right click on the cell select format cell and
then change the format to general or whatever format you want.

"Russ" wrote:

how do I remove data from cells ex. (232)-555-1212 to 2325551212



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

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com