short characters and digits in a cell

sawanmeet

New Member
Joined
Nov 1, 2017
Messages
1
[TABLE="width: 626"]
<tbody>[TR]
[TD="class: xl66, width: 626"]NAYASARAK, CUTTACK, DISTRICT CUTTACK, ORISSA-753002
[TABLE="width: 626"]
<tbody>[TR]
[TD="class: xl68, width: 626"]BAGHTHALA, BLOCK, TAHSIL - BAWAL, DISTRICT - REWARI, PIN - 123501, HARYANA
[TABLE="width: 626"]
<tbody>[TR]
[TD="class: xl68, width: 626"]947,10TH 'D' ROAD, SARDARPURA, JODHPUR - 342001
[TABLE="width: 626"]
<tbody>[TR]
[TD="class: xl68, width: 626"]PIN 123504, NOORGARH CHOWK, HAILY MANDI, PALHAWAS ROAD, NOORGARH,

i have a excel file having address in its D cell wants to extract pin numbers from it need to separate 6 digit pin codes in a separate cell for each entry in other column. [/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[/TR]
</tbody>[/TABLE]
 

Excel Facts

Convert text numbers to real numbers
Select a column containing text numbers. Press Alt+D E F to quickly convert text to numbers. Faster than "Convert to Number"
[table="width: 626"]
<tbody>[tr]
[td="class: Xl66, width: 626"]nayasarak, cuttack, district cuttack, orissa-753002
[table="width: 626"]
<tbody>[tr]
[td="class: Xl68, width: 626"]baghthala, block, tahsil - bawal, district - rewari, pin - 123501, haryana
[table="width: 626"]
<tbody>[tr]
[td="class: Xl68, width: 626"]947,10th 'd' road, sardarpura, jodhpur - 342001
[table="width: 626"]
<tbody>[tr]
[td="class: Xl68, width: 626"]pin 123504, noorgarh chowk, haily mandi, palhawas road, noorgarh,

i have a excel file having address in its d cell wants to extract pin numbers from it need to separate 6 digit pin codes in a separate cell for each entry in other column.[/td]
[/tr]
</tbody>[/table]
[/td]
[/tr]
</tbody>[/table]
[/td]
[/tr]
</tbody>[/table]
[/td]
[/tr]
</tbody>[/table]


=mid(d2,search("//////",substitute(substitute(substitute(substitute(substitute(substitute(substitute(substitute(substitute(substitute(d2,0,"/"),1,"/"),2,"/"),3,"/"),4,"/"),5,"/"),6,"/"),7,"/"),8,"/"),9,"/")),6)
 
Upvote 0
Since you are looking at Indian Pin Codes, following approach shall work as well:
=AGGREGATE(14,6,MID(D2,ROW($A$1:INDEX($A:$A,LEN(D2)-5)),6)+0,1)
* AGGREGATE function Requires Excel 2010 or higher
 
Upvote 0

Forum statistics

Threads
1,223,904
Messages
6,175,295
Members
452,633
Latest member
DougMo

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