Excel VBA FORMULA

rameshca550

New Member
Joined
Aug 17, 2016
Messages
12
I have unique id numbers starting with area code in the ID
E.g. 3321105156755 where 33211 is East-1is area and 05 is the locality i need formula to extract this two elements and get the direct name in other column my data will be
Code. Area. locality
3321105252535. East-1
3321406352535. HP
3321308355689. SH PET
3321205656572. EAST-2
Where
First t
Four digit is
33211= East-1
33212= East-2
33213= Shpeta
33214= HPURAM
I HAVE ONLY 4 area and I'd number all ways is a 13 digit number
Coming to locality i have 22 I add them when u give u vba formula for example 05 next 2 digits 05= mis
06=kmp
Plz give me two vba formula for area and locality
 

Excel Facts

Pivot Table Drill Down
Double-click any number in a pivot table to create a new report showing all detail rows that make up that number
Given a code number like 3321105156755 in A1, one can extract the code for the area and the locality with formulas like

=LEFT(A1,5)
=MID(A1, 6, 2)

Converting those sub-code numbers into text could be done with a VLOOKUP array.
 
Upvote 0

Forum statistics

Threads
1,214,621
Messages
6,120,563
Members
448,972
Latest member
Shantanu2024

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