Re: Removing characters from a cell (keeping only numbers) 2

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



On Tue, 24 Jan 2006 04:12:01 -0800, "Monk" <Monk@xxxxxxxxxxxxxxxxxxxxxxxxx>
wrote:

>Hello..
>
>I did post this question yesterday and following a fantastic response I
>thought I had it rapid up..
>However the cool formula provided has a slight defect to it..
>
>Ok.. The problem..., I have a vast list of cells with numbers with in them
>(which is good) however the string of numbers sometimes commence with the
>?character and sometimes may end with a ?character or both in some cases,
>(which is bad).
>
>Example A1: ?1234435999 A2: 34566673341 A3: ?444532322711?
>
>It appears completely random whether the cells contain any ?character or is
>completely free from the little blighters.
>So I need a formula (rather then macro) to remove all the ???? characters in
>one go (rather then using the longwinded Left / Right formula)
>
>Yesterday I was given the following impressive formula?
>B1
>=LEFT(MID(P29,MIN(SEARCH({0,1,2,3,4,5,6,7,8,9},P29&"0123456789")),MAX(SEARCH({0,1,2,3,4,5,6,7,8,9},"0123456789"&P29))),SUMPRODUCT(--ISNUMBER(--MID(P29,ROW(INDIRECT("1:"&(LEN(P29)))),1))))
>
>This appeared to work perfectly, however I have since noticed if the cell
>ENDS with any consecutive digits (ie. 35999) the formula only appears to
>generate one of the digits (359). Can anyone amend the formula or provide a
>new one to get around my dilemma ..?
>
>Many thanks,
>Monk

The REGEX formula I posted yesterday will handle all that.
--ron
.



Relevant Pages

  • Re: find and replace Excel 2007
    ... My other guess is that you have something in those cells. ... number keypad) to enter the character into the Other box in the text to columns ... Dim iCtr As Long ... Debra Dalgleish has some notes how to implement macros here: ...
    (microsoft.public.excel.worksheet.functions)
  • Re: Quest-ce que cest "--()"?
    ... "Dave R." ... > and want to count the number of these entries with 3 as the 3rd character, ... > to count the number of times '5' is the value of the cells in A1:A100. ... >>>> check them against the criteria. ...
    (microsoft.public.excel.worksheet.functions)
  • Re: Why is my table fragmenting?
    ... If you've pressed ENTER in the table cells, you'll first need to run a Find/Replace ... to replace ^p with some unique character or set of characters. ... >>> I am formating a curriculum and I have inserted several word tables and ... the newsgroup and not by e-mail :-) ...
    (microsoft.public.word.tables)
  • Re: About HeapCreate()
    ... I mainly want to represent color for each character. ... and you can expect performance degradation by orders of magnitude (like 3 ... Another representation is massive chunks of data with the ... HeapAlloc...etc) to allocate cells. ...
    (microsoft.public.vc.mfc)
  • Re: The @ symbol
    ... I do however have control of the export. ... now testing the first character of the exported field and if it contains a ... "Dave Peterson" wrote: ... The cells that begin with @ will still look nice in the cell -- but you'll see ...
    (microsoft.public.excel.misc)