IF Loop VBA 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 DistrictPostal Sector
(1st 2 digits of 6-digit postal codes)
General Location
0101, 02, 03, 04, 05, 06Raffles Place, Cecil, Marina, People's Park
0207, 08Anson, Tanjong Pagar
0314,15, 16Queenstown, Tiong Bahru
0409, 10Telok Blangah, Harbourfront
0511, 12, 13Pasir Panjang, Hong Leong Garden, Clementi New Town
0617High Street, Beach Road (part)
0718, 19Middle Road, Golden Mile
0820, 21Little India
0922, 23Orchard, Cairnhill, River Valley
1024, 25, 26, 27Ardmore, Bukit Timah, Holland Road, Tanglin
1128, 29, 30Watten Estate, Novena, Thomson
1231, 32, 33Balestier, Toa Payoh, Serangoon
1334, 35, 36, 37Macpherson, Braddell
1438, 39, 40, 41Geylang, Eunos
1542, 43, 44, 45Katong, Joo Chiat, Amber Road
1646, 47, 48Bedok, Upper East Coast, Eastwood, Kew Drive
1749, 50, 81Loyang, Changi
1851, 52Tampines, Pasir Ris
1953, 54, 55, 82Serangoon Garden, Hougang, Ponggol
2056, 57Bishan, Ang Mo Kio
2158, 59Upper Bukit Timah, Clementi Park, Ulu Pandan
2260, 61, 62, 63, 64Jurong
2365, 66, 67, 68Hillview, Dairy Farm, Bukit Panjang, Choa Chu Kang
2469, 70, 71Lim Chu Kang, Tengah
2572, 73Kranji, Woodgrove
2677, 78Upper Thomson, Springleaf
2775, 76Yishun, Sembawang
2879, 80Seletar

<tbody>
</tbody>
 

Excel Facts

Do you hate GETPIVOTDATA?
Prevent GETPIVOTDATA. Select inside a PivotTable. In the Analyze tab of the ribbon, open the dropown next to Options and turn it off

Similar threads

Forum statistics

Threads
1,215,674
Messages
6,126,140
Members
449,294
Latest member
Jitesh_Sharma

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