• Outlook User
  • New Outlook app
  • Outlook.com
  • Outlook Mac
  • Outlook & iCloud
  • Developer
  • Microsoft 365 Admin
    • Common Problems
    • Microsoft 365
    • Outlook BCM
    • Utilities & Addins

Custom Field Formulas: Phone Numbers

Slipstick Systems

› Outlook › Rules, Filters & Views › Custom Field Formulas: Phone Numbers

Last reviewed on December 4, 2018     9 Comments

The basics of creating a custom field using a formula

For best results, begin with a custom view:

  1. In Outlook 2010 and up, look on the View ribbon for Change View. Expand it and choose Manage Views. In Outlook 2007 and older, go to the View menu, find the menu for Define views.
  2. Click New.
  3. Type in a Name for the new view and select Table view. Choose who can use the view and which folders it can be used in then click Ok.
  4. Remove any columns (fields) you don't need in the view or print out and Add the fields you want to include in the view.
  5. Click the New Columnbutton (It's New Field in older versions of Outlook).
    Add a field to a view
  6. Enter a name for the field and select Formula from the Type drop down (or press F after tabbing out of the name field)
    create a new custom field
  7. You can type or paste the formula in the Formula field and click Ok or click the Edit button to bring up the Formula Field editor.
    enter a formula in the formula editor
  8. If you know the field names or formula, type them in, or use the Field button to select and enter field names into formulas and the Function button to select functions for your formula.
    insert functions
  9. Make any other changes to the view as desired and press Ok to exit the screens and the Apply the view.

The formula is the example above is from "Create a Custom View to Show the 'Remind at' Time"

Phone Number Formula

Display a phone number as a 7-digit number - for example, you want +1 (202) 222-3456 to display as 2223456

Left(Right([Business Phone],8),3)+Right([Business Phone],4)

How it works: Getting the last 4 digits from the number is easy: Right([Business Phone],4) returns 3456 but getting the 3 numbers from the middle is more difficult because we need get rid of the leading numbers, which may or may not include the country code. Because the numbers we need will always be the last 8 characters (including the dash), we can count in from the right: Right([Business Phone],8) to return 222-3456 then get the first 3 numbers in this string: Left(Right([Business Phone],8),3), which reads the left 3 characters of 222-3456 or 222. The + joins (concatenates) the 222 and 3456 together, giving us 2223456.

screenshot of custom form in contacts folder

Note: If you use extensions with the phone numbers, +1 (202) 222-3456 x1234, this formula will not work. You'll need a more complicated formula that finds the x and counts back from it.

You can't use this method to remove the country or area codes from numbers to sync with PDAs. This method is useful if you need the data in other applications - Use Custom View Data in Another Program.

More Information

Functions (Visual Basic) Not all of the functions in this list are supported in Outlook, but those that are work the same way in Outlook.

Custom Field Formulas: Phone Numbers was last modified: December 4th, 2018 by Diane Poremsky

Related Posts:

  • Create a Custom View to Show the 'Remind at' Time
  • Apply custom views to all folders
  • Filter the To-Do List to Show Only Tasks
  • Create a custom view to list upcoming birthdays

About Diane Poremsky

A Microsoft Outlook Most Valuable Professional (MVP) since 1999, Diane is the author of several books, including Outlook 2013 Absolute Beginners Book. She also created video training CDs and online training classes for Microsoft Outlook. You can find her helping people online in Outlook Forums as well as in the Microsoft Answers and TechNet forums.

Subscribe
Notify of
9 Comments
newest
oldest most voted
Inline Feedbacks
View all comments

James King (@guest_217905)
April 14, 2021 11:31 pm
#217905

Hello Diane, I've been watching your YouTube videos and reading your posts for a while. Time for me to buy one of your books?

I need to make a complicated formula - please could you assist?

I need to calculate the school year of children in Japan (for my English school.) There are a few things to consider:

-The school year runs from April 2nd to April 1st of the following year.
-The school grading system is listed here on Wikipedia under the heading 'School grades:' https://en.wikipedia.org/wiki/Education_in_Japan
-I only need to calculate up to age 18.
-I have already created a feild which calculates the age (I'm not sure if the forumla works for leap years.)

Thank you so much!

James King
kingeikaiwa.com

0
0
Reply
Diane Poremsky(@diane-poremsky)
Author
Reply to  James King
April 15, 2021 9:19 am
#217912

You are looking for "if birthdate is april 2 and april 1, child is in grade x" type of equation?

0
0
Reply
Chris (@guest_212422)
December 16, 2018 3:06 pm
#212422

Can you use a custom VBA function in formula fields?

0
0
Reply
Diane Poremsky(@diane-poremsky)
Author
Reply to  Chris
October 27, 2019 11:20 pm
#214180

To the best of my knowledge, no.

0
0
Reply
Maxime (@guest_196051)
January 21, 2016 7:11 am
#196051

Hi Diane,

I tried following your instructions to make a new column that will show me either the "Display As" field I have entered for that contact in my address book. Or the "Full Name/First Name". I followed the directions, and entered a formula, but maybe my formula isn't correct, because it just keeps coming up blank for the new column I create.

Is there a formula that you know of that will return the info that I wish into the new column.

0
0
Reply
Julie C Nichols (@guest_194163)
October 22, 2015 7:21 pm
#194163

Is there a reference anywhere of example formulas? I'm trying to set the initial value of a custom field based on the date in a different field. I know how to use * and and = for integers or text, but I can't figure out how to use operators like "exist" or specifying dates in the formula.

0
0
Reply
Diane Poremsky(@diane-poremsky)
Author
Reply to  Julie C Nichols
October 25, 2015 12:02 pm
#194217

I think you want DateAdd: this would add 5 days to the date in the other field.
DateAdd(5, 1, [firstdate])

I don't recall any for outlook specifically, but the functions are also used in Excel and Access (and Visual Basic) - search for the function name and you should find something. This is an overview of the functions, although not all of the functions are available in Outlook - https://msdn.microsoft.com/en-us/library/32s6akha(v=vs.90).aspx. Some of the many excel sites online are also good resources for specific formulas and explain the different functions better.

The functions button will inset the function with the required fields.

0
0
Reply
John Campbell (@guest_172346)
November 8, 2012 10:51 am
#172346

Hi

How do I preserve the leading zero in a telephone number in outlook 2010 please

0
0
Reply
Diane Poremsky (@guest_172359)
Reply to  John Campbell
November 9, 2012 5:40 am
#172359

What area code location do you use? Do you have all updates installed for Outlook?
Are you syncing with a smartphone?
0 is preserved in my tests - don't click the button to open the check phone button as that will mess it up.

0
0
Reply

Visit Slipstick Forums.
What's New at Slipstick.com

Latest EMO: Vol. 30 Issue 19

Subscribe to Exchange Messaging Outlook






Support Services

Do you need help setting up Outlook, moving your email to a new computer, migrating or configuring Office 365, or just need some one-on-one assistance?

Our Sponsors

CompanionLink
ReliefJet
  • Popular
  • Latest
  • Week Month All
  • Jetpack plugin with Stats module needs to be enabled.
  • Open Outlook Templates using PowerShell
  • Count and List Folders in Classic Outlook
  • Google Workspace and Outlook with POP Mail
  • Import EML Files into New Outlook
  • Opening PST files in New Outlook
  • New Outlook: Show To, CC, BCC in Replies
  • Insert Word Document into Email using VBA
  • Delete Empty Folders using PowerShell
  • Warn Before Deleting a Contact
  • Classic Outlook is NOT Going Away in 2026
Ajax spinner

Recent Bugs List

Microsoft keeps a running list of issues affecting recently released updates at Fixes or workarounds for recent issues in classic Outlook (Windows).

For new Outlook for Windows: Fixes or workarounds for recent issues in new Outlook for Windows .

Outlook for Mac Recent issues: Fixes or workarounds for recent issues in Outlook for Mac

Outlook.com Recent issues: Fixes or workarounds for recent issues on Outlook.com

Office Update History

Update history for supported Office versions is at Update history for Office

Outlook Suggestions and Feedback

Outlook Feedback covers Outlook as an email client, including Outlook Android, iOS, Mac, and Windows clients, as well as the browser extension (PWA) and Outlook on the web.

Outlook (new) Feedback. Use this for feedback and suggestions for Outlook (new).

Use Outlook.com Feedback for suggestions or feedback about Outlook.com accounts.

Other Microsoft 365 applications and services




New Outlook Articles

Open Outlook Templates using PowerShell

Count and List Folders in Classic Outlook

Google Workspace and Outlook with POP Mail

Import EML Files into New Outlook

Opening PST files in New Outlook

New Outlook: Show To, CC, BCC in Replies

Insert Word Document into Email using VBA

Delete Empty Folders using PowerShell

Warn Before Deleting a Contact

Classic Outlook is NOT Going Away in 2026

Newest Code Samples

Open Outlook Templates using PowerShell

Count and List Folders in Classic Outlook

Insert Word Document into Email using VBA

Warn Before Deleting a Contact

Use PowerShell to Delete Attachments

Remove RE:, FWD:, and Other Prefixes from Subject Line

Change the Mailing Address Using PowerShell

Categorize @Mentioned Messages

Send an Email When You Open Outlook

Delete Old Calendar Events using VBA

Repair PST

Convert an OST to PST

Repair damaged PST file

Repair large PST File

Remove password from PST

Merge Two Data Files

Sync & Share Outlook Data

  • Share Calendar & Contacts
  • Synchronize two computers
  • Sync Calendar and Contacts Using Outlook.com
  • Sync Outlook & Android Devices
  • Sync Google Calendar with Outlook
  • Access Folders in Other Users Mailboxes

Diane Poremsky [Outlook MVP]

Make a donation

Mail Tools

Sending and Retrieval Tools

Mass Mail Tools

Compose Tools

Duplicate Remover Tools

Mail Tools for Outlook

Online Services

Calendar Tools

Schedule Management

Calendar Printing Tools

Calendar Reminder Tools

Calendar Dates & Data

Time and Billing Tools

Meeting Productivity Tools

Duplicate Remover Tools

Productivity

Productivity Tools

Automatic Message Processing Tools

Special Function Automatic Processing Tools

Housekeeping and Message Management

Task Tools

Project and Business Management Tools

Choosing the Folder to Save a Sent Message In

Run Rules on messages after reading

Help & Suggestions

Submit Outlook Feature Requests

Slipstick Support Services

Buy Microsoft 365 Office Software and Services

Visit Slipstick Forums.

What's New at Slipstick.com

Home | Outlook User | Exchange Administrator | Office 365 | Outlook.com | Outlook Developer
Outlook for Mac | Common Problems | Utilities & Addins | Tutorials
Outlook & iCloud Issues | Outlook Apps
EMO Archives | About Slipstick | Slipstick Forums
Submit New or Updated Outlook and Exchange Server Utilities

Send comments using our Feedback page
Copyright © 2025 Slipstick Systems. All rights reserved.
Slipstick Systems is not affiliated with Microsoft Corporation.

wpDiscuz

Sign up for Exchange Messaging Outlook

Our weekly Outlook & Exchange newsletter (bi-weekly during the summer)






Please note: If you subscribed to Exchange Messaging Outlook before August 2019, please re-subscribe.

Never see this message again.

You are going to send email to

Move Comment