Forum Discussion
Extract first 4 digits from postcode from text column
- 4 years ago
deefunk1981 , One way is to search position of BT and then take 4 character
mid([column], search("BT",[Column],,len([Column])), 4)
- 4 years ago
Steps to follow:
1- Create a new column (by right clicking on a table and selecting new column option) and use the calculation given by amitchandaknew_Column = mid([column1], search(" BT",[Column1],,len([Column1])), 4)
this will give you a new column with the first 4 digits of your postcode.search(" BT"...) is going to search in your text if " BT" is there. If it is there then it will take first 4 characters(for which we have used ",4" in the formula) from BT to the right including BT.
Thank you so much for all your help everyone. The solution is now working 😁
Do all the postal codes include "BT"?
- deefunk19814 years agoFrequent Visitor
Yes, all the postcodes are Northern Ireland and thankfully all start with BT which makes things a lot easier.