The basics of creating a custom field using a formula
For best results, begin with a custom view:
- 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.
- Click New.
- 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.
- 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.
- Click the New Columnbutton (It's New Field in older versions of Outlook).
- Enter a name for the field and select Formula from the Type drop down (or press F after tabbing out of the name field)
- 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.
- 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.
- 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.
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.
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
You are looking for "if birthdate is april 2 and april 1, child is in grade x" type of equation?
Can you use a custom VBA function in formula fields?
To the best of my knowledge, no.
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.
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.
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.
Hi
How do I preserve the leading zero in a telephone number in outlook 2010 please
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.