VBA Script

Job ID: 34488046

Budget: ₹100 – ₹400 INR

I get data always from different people and it is in this format:

91 80 40931584(R) 9980099607(M) -
999999999999999(M) - this is not valid. **Remove & shift data above**
91 - 9886033006 91-080-9886033006
0877 3120132 91-0877-2241056
09860021507291-- remove as this is beyond 10 digit.
+919380519217 +91-44-2447 5200
+919380519217
+91-44-2447 5200

In the case of landline nos., 91 is country code and 80 is city code (which can be 2-4 digits) and after that 7 digit (40931584) is telephone no. If any occurrence VBA finds, then it should produce result like: 08040931584 removing all 91s.

In the case of mobile nos., mobiles will start from 7/8/9, e.g. 9980099607 and they will be strictly 10 digits. AI should remove all +91s and sometimes 91 (no plus). This creates so much confusion.

I want some VBA Script which works with artificial intelligence (I mean some logic) and understands all mobile numbers and landline numbers and clears them and distributes them in new columns if need be. If its only 1 number leave it there only.

Final result I am expecting should be:

08040931584 9980099607
9886033006 9886033006 (91-080-removed because it is a mobile and doesnt require city and country code)
08773120132 08772241056
9380519217 04424475200
9380519217
04424475200

The subscriber phone numbers are 6, 7 or 8-digit long depending upon the length of the STD code. STD codes are either 4, 3 or 2 digits.

When the area code is 2-digit, the phone number is 8-digit (2+8)
When the area code is 3-digit, the phone number is 7-digit (3+7)
When the area code is 4-digit, the phone number is 6-digit (4+6)

------
I already have code. modification is required. Please check attached file.