Selecting X no of characters from 1 field to update another

DavidAC

Board Regular
Joined
Feb 10, 2003
Messages
134
Office Version
  1. 365
I have a table which has a full post code field in it. This field will then be used to update another field POSTCODE1 but i only need to take either the the first 5 or 6 characters including spaces from the original field to do the update.
any help would be appreciated

:oops:
 

Excel Facts

Can you AutoAverage in Excel?
There is a drop-down next to the AutoSum symbol. Open the drop-down to choose AVERAGE, COUNT, MAX, or MIN
Re: Selecting X no of characters from 1 field to update anot

Look up the LEFT function in Help. If you need more help, please expand on what you're trying to do.

Thank you,

Russell
 
Upvote 0
Re: Selecting X no of characters from 1 field to update anot

Hi i currently have a field which contains post codes. I now need to be able to strip these post codes down to the initial 5 and 6 characters and update this information to another field whilst leaving the original post code in tact.
EG) POST_CODE SHORT_POST_CODE
DL17 8DD DL17 8
HG8 1AA HG8 1
i can use left trim to show the first 5 or 6 characters of the field but if i update directly from this it updates all other postcodes so ends up giving me HG8 1A as a example. i need to know how to speicfy only the first 5 or 6 characters in the POST_CODE table in order to run the update query successfully.

:pray:
 
Upvote 0
Re: Selecting X no of characters from 1 field to update anot

You can try this :

Left([POST_CODE],InStr([POST_CODE]," ")+1)

in "Update To:" field in your query.

Suat
 
Upvote 0
Re: Selecting X no of characters from 1 field to update anot

Thanks for that i have run it and it is working. thanks for your help.
:p
 
Upvote 0

Forum statistics

Threads
1,221,539
Messages
6,160,412
Members
451,644
Latest member
hglymph

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