short characters and digits in a cell

sawanmeet

New Member
Joined
Nov 1, 2017
Messages
1
NAYASARAK, CUTTACK, DISTRICT CUTTACK, ORISSA-753002
BAGHTHALA, BLOCK, TAHSIL - BAWAL, DISTRICT - REWARI, PIN - 123501, HARYANA
947,10TH 'D' ROAD, SARDARPURA, JODHPUR - 342001
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.

<tbody>
</tbody>

<tbody>
</tbody>

<tbody>
</tbody>

<tbody>
</tbody>
 

Excel Facts

Last used cell?
Press Ctrl+End to move to what Excel thinks is the last used cell.
nayasarak, cuttack, district cuttack, orissa-753002
baghthala, block, tahsil - bawal, district - rewari, pin - 123501, haryana
947,10th 'd' road, sardarpura, jodhpur - 342001
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.

<tbody>
</tbody>

<tbody>
</tbody>

<tbody>
</tbody>

<tbody>
</tbody>


=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,215,047
Messages
6,122,858
Members
449,096
Latest member
Erald

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