IF checking

afrobea_r

Board Regular
Joined
Aug 16, 2015
Messages
76
Dear excel wizards,

I am trying to insert a part in my current macro whereby I can return a value based on the following table condition as below.

How do I develop a Macro that calculates a value for a specific column to equal the value of general location in this table?

Basically it should generate the location value based on postal code numbers.

Need all the help I can get. Thanks!! Yan

Postal District
Postal Sector
(1st 2 digits of 6-digit postal codes)
General Location
01
01, 02, 03, 04, 05, 06
Raffles Place, Cecil, Marina, People's Park
02
07, 08
Anson, Tanjong Pagar
03
14,15, 16
Queenstown, Tiong Bahru
04
09, 10
Telok Blangah, Harbourfront
05
11, 12, 13
Pasir Panjang, Hong Leong Garden, Clementi New Town
06
17
High Street, Beach Road (part)
07
18, 19
Middle Road, Golden Mile
08
20, 21
Little India
09
22, 23
Orchard, Cairnhill, River Valley
10
24, 25, 26, 27
Ardmore, Bukit Timah, Holland Road, Tanglin
11
28, 29, 30
Watten Estate, Novena, Thomson
12
31, 32, 33
Balestier, Toa Payoh, Serangoon
13
34, 35, 36, 37
Macpherson, Braddell
14
38, 39, 40, 41
Geylang, Eunos
15
42, 43, 44, 45
Katong, Joo Chiat, Amber Road
16
46, 47, 48
Bedok, Upper East Coast, Eastwood, Kew Drive
17
49, 50, 81
Loyang, Changi
18
51, 52
Tampines, Pasir Ris
19
53, 54, 55, 82
Serangoon Garden, Hougang, Ponggol
20
56, 57
Bishan, Ang Mo Kio
21
58, 59
Upper Bukit Timah, Clementi Park, Ulu Pandan
22
60, 61, 62, 63, 64
Jurong
23
65, 66, 67, 68
Hillview, Dairy Farm, Bukit Panjang, Choa Chu Kang
24
69, 70, 71
Lim Chu Kang, Tengah
25
72, 73
Kranji, Woodgrove
26
77, 78
Upper Thomson, Springleaf
27
75, 76
Yishun, Sembawang
28
79, 80
Seletar

<tbody>
</tbody>
 
Dear Sunny,

Just an update, I have successfully incorporated your solution into my overall formula and it works fine.

Thank you very much for your help on this matter. I appreciate it!

Have a good day.
 
Upvote 0

Excel Facts

Is there a shortcut key for strikethrough?
Ctrl+S is used for Save. Ctrl+5 is used for Strikethrough. Why Ctrl+5? When you use hashmarks to count |||| is 4, strike through to mean 5.

Forum statistics

Threads
1,214,904
Messages
6,122,169
Members
449,070
Latest member
webster33

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