Hi,

Sorry for the long formula if sombody found somthing in short please let me 
know ;)

If value is in cell A1 paste below code on cell A2 with Ctrl + Shift + Enter


=REPLACE(A1,MATCH(1,N(ISNUMBER(VALUE(MID(A1,ROW(INDIRECT("1:"&LEN(A1))),4)))),0)+1,MAX(N(ISNUMBER(VALUE(MID(A1,ROW(INDIRECT("1:"&LEN(A1))),1))))*ROW(INDIRECT("1:"&LEN(A1))))-MATCH(1,N(ISNUMBER(VALUE(MID(A1,ROW(INDIRECT("1:"&LEN(A1))),4)))),0),SUBSTITUTE(MID(A1,MATCH(1,N(ISNUMBER(VALUE(MID(A1,ROW(INDIRECT("1:"&LEN(A1))),4)))),0),MAX(N(ISNUMBER(VALUE(MID(A1,ROW(INDIRECT("1:"&LEN(A1))),1))))*ROW(INDIRECT("1:"&LEN(A1))))-MATCH(1,N(ISNUMBER(VALUE(MID(A1,ROW(INDIRECT("1:"&LEN(A1))),4)))),0)+1),"
 
",""))


Regards,
Lalit Mohan

On Wednesday, 2 January 2013 13:25:54 UTC+5:30, Manoj Kumar wrote:
>
> Thanks Anoop.
>
> Solved My Problem. but it would be nice if formula also return the name 
> along with phone number.
>
> On Wednesday, 2 January 2013 13:17:35 UTC+5:30, Enrique Martin wrote:
>>
>> Paste the following code in the module. this will extract all the numbers 
>> removing spaces.
>>
>> Please see the example in attached file.
>>
>> Function RemoveSpaces(str As String) As String
>>         Dim myLen As Long
>>         Dim myChar As String
>>         Dim myWrd As String
>>         Dim iCount As Integer
>>         Dim myGet As String
>>         myLen = Len(str)
>>         myWrd = str
>>         For iCount = 1 To myLen
>>             myChar = Mid$(myWrd, iCount, 1)
>>             If IsNumeric(myChar) Then
>>                 myGet = myGet & myChar
>>             End If
>>             Debug.Print myChar
>>         Next iCount
>>         RemoveSpaces = myGet
>> End Function
>>
>> Regards,
>> Anoop
>>
>>
>> On Wed, Jan 2, 2013 at 1:01 PM, Prince <prince...@gmail.com> wrote:
>>
>>> In this case we need to have a fomula that can count the existence of 
>>> number in the text so in that case we need to modify this formula.
>>>
>>> that i let u know how.
>>>
>>> Regards
>>> Prince
>>>
>>>
>>> On Wednesday, January 2, 2013 12:54:34 PM UTC+5:30, Francis Mukobi wrote:
>>>
>>>> What if it is a list of phone numbers and these numbers have different 
>>>> lengths? I mean some phone numbers are from India (10 digits ) and some 
>>>> numbers are from say Indonesia (14 digits ) etc. How do I remove spaces 
>>>> from such a list of numbers?
>>>>
>>>> Over to you Prince. 
>>>>
>>>> Francis Mukobi
>>>> Frank Web Hosts
>>>> Your affordable & quality web hosts 
>>>> http://frankhost.net
>>>>
>>>> For every domain purchased from us, we host you for the first 3 months 
>>>> FREE!
>>>>
>>>> Prince <prince...@gmail.com> wrote:
>>>>
>>>> >Hi Francis,
>>>> >
>>>> >This formula cut the string from first charactor up the number of 
>>>> numeric 
>>>> >value inside that text i mean i have assumed that numeric value is a 
>>>> mobile 
>>>> >number and every mobile number contains 10 digits in india so i cut 
>>>> the 
>>>> >last 12 digit including space and concat that with first string that i 
>>>> got 
>>>> >from left.
>>>> >
>>>> >Regards
>>>> >Prince
>>>> >
>>>> >On Wednesday, January 2, 2013 12:00:56 PM UTC+5:30, Francis Mukobi 
>>>> wrote:
>>>> >>
>>>> >> Could you please elaborate on the formula you have given, Prince?
>>>> >>
>>>> >> Francis Mukobi
>>>> >> Frank Web Hosts
>>>> >> Your affordable & quality web hosts
>>>> >> http://frankhost.net
>>>> >>
>>>> >>
>>>> >> Manoj Kumar <manoj...@gmail.com <javascript:>> wrote:
>>>> >>
>>>> >> >there is some text at end also. Sorry for inconvenience.
>>>> >> >
>>>> >> >
>>>> >> >On Wed, Jan 2, 2013 at 11:20 AM, Prince 
>>>> >> ><prince...@gmail.com<**javascript:>> 
>>>>
>>>> >> wrote:
>>>> >> >
>>>> >> >> Hi Manoj,
>>>> >> >>
>>>> >> >> use this this may help you incase if the Number is any Mobile 
>>>> number:
>>>> >> >>
>>>> >> >> =MID(A1,1,LEN(A1)-12)&**SUBSTITUTE(RIGHT(A1,12)," ","")
>>>> >> >>
>>>> >> >> regards
>>>> >> >> Prince
>>>> >> >>
>>>> >> >> On Wednesday, January 2, 2013 11:04:37 AM UTC+5:30, Manoj Kumar 
>>>> wrote:
>>>> >> >>>
>>>> >> >>> Hi,
>>>> >> >>>
>>>> >> >>> Is there any way out for removing spaces between numbers only. 
>>>> Spaces
>>>> >> >>> between the text should be removed.
>>>> >> >>>
>>>> >> >>> For example.
>>>> >> >>>
>>>> >> >>> Manoj Kumar 9015 408 078         Manoj Kumar 9015418078
>>>> >> >>>
>>>> >> >>> The text at the front is not always fixed. It can contain any 
>>>> number 
>>>> >> text
>>>> >> >>> and spaces.
>>>> >> >>>
>>>> >> >>> Regards,
>>>> >> >>> Manoj
>>>> >> >>>
>>>> >> >>  --
>>>> >> >> Join official Facebook page of this forum @
>>>> >> >> https://www.facebook.com/**discussexcel<https://www.facebook.com/discussexcel>
>>>> >> >>
>>>> >> >> FORUM RULES
>>>> >> >>
>>>> >> >> 1) Use concise, accurate thread titles. Poor thread titles, like 
>>>> Please
>>>> >> >> Help, Urgent, Need Help, Formula Problem, Code Problem, and Need 
>>>> Advice
>>>> >> >> will not get quick attention or may not be answered.
>>>> >> >> 2) Don't post a question in the thread of another member.
>>>> >> >> 3) Don't post questions regarding breaking or bypassing any 
>>>> security
>>>> >> >> measure.
>>>> >> >> 4) Acknowledge the responses you receive, good or bad.
>>>> >> >> 5) Jobs posting is not allowed.
>>>> >> >> 6) Sharing copyrighted material and their links is not allowed.
>>>> >> >>
>>>> >> >> NOTE : Don't ever post confidential data in a workbook. Forum 
>>>> owners and
>>>> >> >> members are not responsible for any loss.
>>>> >> >> ---
>>>> >> >> You received this message because you are subscribed to the 
>>>> Google 
>>>> >> Groups
>>>> >> >> "MS EXCEL AND VBA MACROS" group.
>>>> >> >> To post to this group, send email to excel-...@googlegroups.com<*
>>>> *javascript:>
>>>> >> .
>>>> >> >> To unsubscribe from this group, send email to
>>>> >> >> excel-macros...@googlegroups.**com <javascript:>.
>>>> >> >> Visit this group at http://groups.google.com/**
>>>> group/excel-macros?hl=en<http://groups.google.com/group/excel-macros?hl=en>
>>>> .
>>>> >> >>
>>>> >> >>
>>>> >> >>
>>>> >> >
>>>> >> >
>>>> >> >
>>>> >> >-- 
>>>> >> >Regards,
>>>> >> >Manoj
>>>> >> >
>>>> >> >-- 
>>>> >> >Join official Facebook page of this forum @ 
>>>> >> https://www.facebook.com/**discussexcel<https://www.facebook.com/discussexcel>
>>>> >> >
>>>> >> >FORUM RULES
>>>> >> >
>>>> >> >1) Use concise, accurate thread titles. Poor thread titles, like 
>>>> Please 
>>>> >> Help, Urgent, Need Help, Formula Problem, Code Problem, and Need 
>>>> Advice 
>>>> >> will not get quick attention or may not be answered.
>>>> >> >2) Don't post a question in the thread of another member.
>>>> >> >3) Don't post questions regarding breaking or bypassing any 
>>>> security 
>>>> >> measure.
>>>> >> >4) Acknowledge the responses you receive, good or bad.
>>>> >> >5) Jobs posting is not allowed.
>>>> >> >6) Sharing copyrighted material and their links is not allowed.
>>>> >> >
>>>> >> >NOTE  : Don't ever post confidential data in a workbook. Forum 
>>>> owners and 
>>>> >> members are not responsible for any loss.
>>>> >> >--- 
>>>> >> >You received this message because you are subscribed to the Google 
>>>> Groups 
>>>> >> "MS EXCEL AND VBA MACROS" group.
>>>> >> >To post to this group, send email to excel-...@googlegroups.com<**
>>>> javascript:>
>>>> >> .
>>>> >> >To unsubscribe from this group, send email to 
>>>> >> excel-macros...@googlegroups.**com <javascript:>.
>>>> >> >Visit this group at http://groups.google.com/**
>>>> group/excel-macros?hl=en<http://groups.google.com/group/excel-macros?hl=en>
>>>> .
>>>> >> >
>>>> >> >
>>>> >>
>>>> >>
>>>> >
>>>> >-- 
>>>> >Join official Facebook page of this forum @ https://www.facebook.com/*
>>>> *discussexcel <https://www.facebook.com/discussexcel>
>>>> >
>>>> >FORUM RULES
>>>> >
>>>> >1) Use concise, accurate thread titles. Poor thread titles, like 
>>>> Please Help, Urgent, Need Help, Formula Problem, Code Problem, and Need 
>>>> Advice will not get quick attention or may not be answered.
>>>> >2) Don't post a question in the thread of another member.
>>>> >3) Don't post questions regarding breaking or bypassing any security 
>>>> measure.
>>>> >4) Acknowledge the responses you receive, good or bad.
>>>> >5) Jobs posting is not allowed.
>>>> >6) Sharing copyrighted material and their links is not allowed.
>>>> >
>>>> >NOTE  : Don't ever post confidential data in a workbook. Forum owners 
>>>> and members are not responsible for any loss.
>>>> >--- 
>>>> >You received this message because you are subscribed to the Google 
>>>> Groups "MS EXCEL AND VBA MACROS" group.
>>>> >To post to this group, send email to excel-...@googlegroups.com.
>>>> >To unsubscribe from this group, send email to excel-macros...@**
>>>> googlegroups.com.
>>>>
>>>> >Visit this group at http://groups.google.com/**
>>>> group/excel-macros?hl=en<http://groups.google.com/group/excel-macros?hl=en>
>>>> .
>>>> >
>>>> >
>>>>
>>>>  -- 
>>> Join official Facebook page of this forum @ 
>>> https://www.facebook.com/discussexcel
>>>  
>>> FORUM RULES
>>>  
>>> 1) Use concise, accurate thread titles. Poor thread titles, like Please 
>>> Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice 
>>> will not get quick attention or may not be answered.
>>> 2) Don't post a question in the thread of another member.
>>> 3) Don't post questions regarding breaking or bypassing any security 
>>> measure.
>>> 4) Acknowledge the responses you receive, good or bad.
>>> 5) Jobs posting is not allowed.
>>> 6) Sharing copyrighted material and their links is not allowed.
>>>  
>>> NOTE : Don't ever post confidential data in a workbook. Forum owners and 
>>> members are not responsible for any loss.
>>> --- 
>>> You received this message because you are subscribed to the Google 
>>> Groups "MS EXCEL AND VBA MACROS" group.
>>> To post to this group, send email to excel-...@googlegroups.com.
>>> To unsubscribe from this group, send email to 
>>> excel-macros...@googlegroups.com.
>>> Visit this group at http://groups.google.com/group/excel-macros?hl=en.
>>>  
>>>  
>>>
>>
>>
>>
>> -- 
>> Regards,
>> Anoop
>> Sr. Developer
>>  
>

-- 
Join official Facebook page of this forum @ 
https://www.facebook.com/discussexcel

FORUM RULES

1) Use concise, accurate thread titles. Poor thread titles, like Please Help, 
Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will not get 
quick attention or may not be answered.
2) Don't post a question in the thread of another member.
3) Don't post questions regarding breaking or bypassing any security measure.
4) Acknowledge the responses you receive, good or bad.
5) Jobs posting is not allowed.
6) Sharing copyrighted material and their links is not allowed.

NOTE  : Don't ever post confidential data in a workbook. Forum owners and 
members are not responsible for any loss.
--- 
You received this message because you are subscribed to the Google Groups "MS 
EXCEL AND VBA MACROS" group.
To post to this group, send email to excel-macros@googlegroups.com.
To unsubscribe from this group, send email to 
excel-macros+unsubscr...@googlegroups.com.
Visit this group at http://groups.google.com/group/excel-macros?hl=en.


Reply via email to