Re: Extracting numbers from a single sell
- From: Ron Rosenfeld <ronrosenfeld@xxxxxxxxxx>
- Date: Mon, 29 Dec 2008 15:04:51 -0500
On Mon, 29 Dec 2008 07:18:18 -0800 (PST), Georgi <inter778@xxxxxxxxx> wrote:
Hi Ron,
I didn`t saw this part of your post. I did it and it is working
briliantly! Sorry for the waste of your time !
P.S. Now after I`ve asked they`ve sent me a real table with around
1000 cells, so I can see if there is any variantions in the mobile
numbers.... and I found that the personal that entered the phone
numbers, used all kind of ways to enter them. In some cases they used
0877/55/44/33 ; 0877-55-44-33 - I`ve used Find&Replace on them and
after that your formula worked just perfect. But there is another case
- 0877 554433 or 0877 55 44 33 - in this case I don`t think that there
is something that we can do, despite some handwork :). Now I`m trying
to find a way to just find the cells that contain numbers with 3 to 6
digits, so I can manualy check what is the problem with them, but I
cannot find the right way to do it - I`ve tried some strings in
Find&Replace but they don`t seem to work.
Instead of using the Find/Replace, try using the following Regex instead:
"\b\d[-\d\s\/]{3,}\d\b"
So your formula might be:
=RegexMid($U2,"\b\d[-\d\s\/]{3,}\d\b",COLUMNS($A:A))
It may be that this may return data that is not valid, but that may be easier
to deal with. In particular, this regex is looking for a string that
1. Start with a digit
2. The next three or more characters can be a hyphen, digit, space or
backslash.
3. End with a digit.
So it should pick up all five digit string, even if they include the extra
characters. But it could also pick up something like 1///2. That's probably
not a problem for your database. (If it is, we could deal with it by making
the regex more complex, but I'm lazy :-))
--ron
.
- Follow-Ups:
- Re: Extracting numbers from a single sell
- From: Georgi
- Re: Extracting numbers from a single sell
- References:
- Extracting numbers from a single sell
- From: Georgi
- Re: Extracting numbers from a single sell
- From: Georgi
- Re: Extracting numbers from a single sell
- From: Ron Rosenfeld
- Re: Extracting numbers from a single sell
- From: Georgi
- Re: Extracting numbers from a single sell
- From: Ron Rosenfeld
- Re: Extracting numbers from a single sell
- From: Georgi
- Extracting numbers from a single sell
- Prev by Date: Re: Over My Head Print Code
- Next by Date: Re: Coping cell comments to another cell
- Previous by thread: Re: Extracting numbers from a single sell
- Next by thread: Re: Extracting numbers from a single sell
- Index(es):
Relevant Pages
|