Working with phone number

a4aniruddh

New Member
Joined
Jun 1, 2010
Messages
8
Hi,

I am a beginner in VB. I need help in phone number formatting in excel VBA. Below is my requirement.
My requirement is.
I am getting phone numbers in one sheet in row for eg A1:A50
I need to prefix std codes if needed. for example if number is 25736305 from bangalore. I need to add 080. Final final output should be 08025736305. If it is already prefixed then no need to prefix once again.
Also it should validate the number. That is after adding std the number length should not exceed 10 digits. Because in India the phone number length is 10. I need that invalid length number in different sheet or workbook and remove from original.

Request your help on this on how to achieve this on excel vba.
 
Hightime, I should get a html maker now..code looks unformatted here.:ROFLMAO:

You don't need the html maker for that.

Use code tags (without the spaces) [ CODE] Your Code here [ /CODE] <input id="gwProxy" type="hidden"><!--Session data--><input *******="jsCall();" id="jsProxy" type="hidden">
 
Upvote 0

Excel Facts

Excel motto
Not everything I do at work revolves around Excel. Only the fun parts.

Forum statistics

Threads
1,214,907
Messages
6,122,183
Members
449,071
Latest member
cdnMech

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