Extracting Letters from a String

testsubjec

New Member
Joined
Jul 14, 2011
Messages
33
Hi All,

I have a rather large excel spreadsheet which is given to me on a weekly basis. The spreadsheet contains information about job deliveries.

I need to be able to either extract or use a lookup to check part of the Post Code.

Example.

Lookup
AB = £5
A = £2
S = £2

PostCode
AB5 4RG
A33 6RG
S70 2EE

So I need Excel to be able to pick out AB, A and S and then place the relavent charge into another colunm. Now the lookup I can setup without a problem but I am not 100% sure how get Excel to pick out the first couple of letters.

Any help would be much appreicated.
 

Excel Facts

Format cells as time
Select range and press Ctrl+Shift+2 to format cells as time. (Shift 2 is the @ sign).
In sheet OLD NEXT DAY ZONING MATRIX

Name E5:F14 as Zone1

Name H5:I14 as Zone2

etc etc

formula in P7 of Sheet1:
=VLOOKUP(I7,INDIRECT(SUBSTITUTE(O7," ","")),2)
 
Upvote 0
Thank you for all your help with my little problems. :-)

I have just one more little query.

PostCode PL, W, etc are full PostCodes which are assigned a Zone. It has now come to light that we have split PostCodes so for example, B1 - B59 might be assigned Zone 1, B60 - B61 assigned Zone 4, B62 and onwards Zone 9.

Now I can setup the PostCode to Zone lookup table to include these split Postcodes:

B1 - Zone 1
B2 - Zone 1
etc, etc

That's not a problem, if there is a better way to be this then great.

The other other I have is how to get B1 extracted from the Postcode so the vlookup can use this, but for full PostCodes PL, W, etc to use the letters.

Hope this makes sense.

Thanks again for all your help.
 
Upvote 0

Forum statistics

Threads
1,224,600
Messages
6,179,836
Members
452,947
Latest member
Gerry_F

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