+ Start a Discussion
Mark Lewis 15Mark Lewis 15 

How to use less characters instead of repeating lines???

I am trying to cut down my coding to allow for more space: Can someone please help me combine this onto one line to save characters?
Do you use OR or CONTAINS??? Many thanks
IF(BEGINS (MailingPostalCode, "BT7 "), "South", 
IF(BEGINS (MailingPostalCode, "BT8 "), "South", 
IF(BEGINS (MailingPostalCode, "BT9 "), "South", 
IF(BEGINS (MailingPostalCode, "BT10"), "South", 




 
Best Answer chosen by Mark Lewis 15
StephenKennyStephenKenny
Hi Mark,
You can use the CASE function for this:

CASE(BEGINS(MailingPostalCode),
"BT7", "South",
"BT8", "South",
"BT9", "South",
"BT10", "South",
"")

Please remember to mark this thread as solved with the answer that best helps you.

Regards
Stephen 

All Answers

StephenKennyStephenKenny
Hi Mark,
You can use the CASE function for this:

CASE(BEGINS(MailingPostalCode),
"BT7", "South",
"BT8", "South",
"BT9", "South",
"BT10", "South",
"")

Please remember to mark this thread as solved with the answer that best helps you.

Regards
Stephen 
This was selected as the best answer
Mark Lewis 15Mark Lewis 15
Hi Stephen,

Thanks very much for getting back to me so quickly! 

Many thanks for your time and help!!
StephenKennyStephenKenny
Not a problem, Please mark this thread as solved so others may find this more easily.