Extracting info from cell.

RIZVI

Active Member
Joined
Jan 1, 2011
Messages
295
Office Version
  1. 2010
Platform
  1. Windows
Hi

Can the mobile numbers that are 10 digit (from left) and telephone numbers that are 7 digit (from left) can also e extracted? Secondly what if there are more than one number that needs to be extracted separated by a comma?

Can they be extracted separately in different cells? I mean mobile number in one and telephone number in another.
Also is it possible to extract the names in yet another cell.

The sample data is given below. The data can have zip codes, and few numeric in e-mails, like some one can hv emial ID as rizvi123@xyz.com. There can be door numbers house numbers & street numbers.

Sample Data in Cell:

Zesyan Tazi, Yhur Naki, Pachin Tanungo, Bunil K, Uishwas Bulkarni 023152453077, 07346389379, 9989113882, +
916754358383(+1), 09453905494(+3) Supil.K@houseji.in, vishwas.kulkarni@horihtlmar.in , Survey No.5, 6&7, Baikampady Industrial Area, MANGALORE KARNATAKA -575011, sachin.kanoiuo@ahafrymar.in , Survey No 5, 6 e 7 Baikampady Industrial Area Mangalore 5 Karnataka, India 575011

Clarification on mobile & telephone numbers:

First number
023152453077 is a landline number. It is 12 digit. Actual number is only 7 digit from left and suffix is Area code. so the number is 02315-2453077.
Second number: 07346389379 is a mobile number. Suffix 0 is added for outstation mobile numbers. So the real number is only 7346389379.
Third number is mobile number 9989113882
Fourth number 916754358383(+1) is having (+1) at the end and is not required. It is mobile number with 91 as a country code, and is not required. Some time the number may have a plus sign in front of country code and some times not.
Last number 09453905494(+3) is also a mobile number with (+3) in racket that is not required.


PS: The e-mails and numbers have been changed and are not real emials n numbers.


Looking for help on the above. Thanking you in anticipation.

RGDS,

Rizvi.M.H.
 
Last edited:

Excel Facts

Create a chart in one keystroke
Select the data and press Alt+F1 to insert a default chart. You can change the default chart to any chart type
Code:
Function myFunction(cellValue)
     'Example cellValue data: _
     Zesyan Tazi, Yhur Naki, Pachin Tanungo, Bunil K, Uishwas Bulkarni 023152453077, 07346389379, 9989113882, +916754358383(+1), 09453905494(+3) Supil.K@houseji.in, vishwas.kulkarni@horihtlmar.in , Survey No.5, 6&7, Baikampady Industrial Area, MANGALORE KARNATAKA -575011, sachin.kanoiuo@ahafrymar.in , Survey No 5, 6 e 7 Baikampady Industrial Area Mangalore 5 Karnataka, India 575011

     mySplit = Split(cellValue, ", ")
     For Each element In mySplit
          If landline_Function(element) = True Then

          ElseIf mobile_Function(element) = True Then

          ElseIf email_Function(element) = True

          
          End If
     Next element
End Function

As you can see I started working the problem but then I realized that you have a state and a country seperated by a comma. This is a problem since commas are the delimiter. So there is no easy way to solve this.
 
Upvote 0

Forum statistics

Threads
1,223,264
Messages
6,171,081
Members
452,377
Latest member
bradfordsam

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top