Outlook User Defined Fields: Formula in Inbox?
- Average speed
- km/h
- Result
- Finish time
- 50 min
- You entered
- Distance
- 10 km
- You entered
Outlook user defined fields cannot be used in formulas directly within the inbox view, but you can create calculated custom fields in folder views using the Formula option in the Field Chooser, and you can also use them in mail merge or export scenarios. This article explains what user defined fields are, how to add a formula-based field to your inbox, and what limitations you will hit.
Formula
The formula for average pace is:
pace (min/km) = total time (min) / distance (km)
Where:
- t = total time in minutes (e.g., 50)
- d = distance in kilometres (e.g., 10)
- pace = minutes per kilometre (e.g., 5.0)
Average speed is the inverse: speed (km/h) = distance (km) / (time (min) / 60).
Worked Example
Using the default values from the calculator: t = 50 minutes, d = 10 km.
- Pace = 50 / 10 = 5.0 min/km
- Speed = 10 / (50 / 60) = 10 / 0.8333 = 12.0 km/h
The calculator returns pace 5.00 min/km and speed 12.00 km/h.
How Outlook User Defined Fields Work
In Microsoft Outlook, a user defined field is a custom property you add to an item (mail, contact, task, appointment) or to a folder view. There are two distinct kinds:
- Item-level user defined fields – stored with each individual item (e.g., a custom text box on a contact). These are not calculated; they hold whatever you type.
- View-level formula fields – created in the View Settings → Columns → New Field, where you choose Formula as the type. These are calculated on the fly from other fields in that view.
The confusion arises because many users expect to write a formula inside a user defined field in a contact or mail item, but Outlook does not support that. The formula field only exists in a view, and it only works with fields that Outlook exposes in that view.
Adding a Formula Field to Your Inbox View
To add a calculated field to your Inbox:
- Open your Inbox.
- Go to View tab → View Settings → Columns.
- Click New Field.
- Type a name (e.g., “Size in KB”).
- In the Type dropdown, select Formula.
- In the Formula box, enter an expression like
[Size] / 1024. - Click OK, then Add, then OK again.
The formula field appears as a new column in your Inbox, recalculated whenever the view refreshes. You can sort or group by it, but you cannot edit it directly.
What Formulas Are Allowed?
Outlook’s formula language is basic. You can use:
- Arithmetic:
+,-,*,/,^ - Comparison:
=,<>,<,>,<=,>= - Text functions:
UCase,LCase,Left,Right,Len - Date functions:
DateAdd,DateDiff,DatePart,DateSerial,DateValue,Day,Month,Year,Now,Date - Logical:
IIf(condition, truepart, falsepart)
You cannot use VBA, loops, or custom functions. Field names must be in square brackets, e.g., [Received], [Size], [Subject].
Common Problems and Workarounds
Here are typical issues you will encounter:
- Formula field is blank – The formula references a field that is not available in the view (e.g.,
[Size]is not available for mail items in some views). Use only fields that appear in the Field Chooser list. - Cannot use user defined fields in formulas – If you created a custom text field on a contact, you cannot reference it in a view formula unless that field is also added to the view as a column. Even then, Outlook may not expose custom item fields to the formula engine.
- Formula field does not update – It recalculates when the view refreshes, not in real time. Press F5 or close/reopen the folder.
- Date math returns a number, not a date – Use
DateAddorDateDiffto get a numeric difference, then format as needed. - Formula field disappears after restart – If you created it in a one-off view (not the default view), it may not persist. Save the view with View Settings → Save Current View As.
Alternatives to Formula Fields
If you need more complex calculations or want to use user defined fields in a formula, consider these options:
- Export to Excel – Export your Inbox to a CSV or Excel file, then use Excel formulas. This gives you full control over calculated columns.
- Use a VBA macro – Write a small Outlook VBA macro that reads item properties, computes a value, and writes it to a user defined field. This runs on demand or on item open.
- Use a third-party add-in – Some add-ins extend Outlook’s field capabilities, but they are not built-in.
- Use a search folder with a custom view – Create a search folder that includes the items you want, then apply a formula field to that folder’s view.
For most users, the simplest path is to export to Excel and do the heavy lifting there.
Frequently Asked Questions
Can I use a user defined field in a formula in Outlook?
No, not directly. Outlook’s formula fields can only reference built-in fields that are available in the view. User defined fields you create on items (like a custom text box on a contact) are not accessible to the formula engine. You can, however, create a formula field that uses built-in fields, or you can write a VBA macro that reads your custom field and computes a value.
Why is my formula field blank in the Inbox?
The most common reason is that the formula references a field that isn’t available for mail items in that view. For example, [Size] is not a standard mail field in all views. Check the field list in the Field Chooser – only fields listed there are usable. Also ensure you didn’t misspell a field name.
How do I create a calculated column in Outlook?
Go to View → View Settings → Columns → New Field, set Type to Formula, and enter your expression. This creates a calculated column in that view only. It is not stored with each item.
Can I sort or group by a formula field?
Yes, you can sort and group by a formula field just like any other column. However, grouping may be slow if the formula is complex or the folder is large, because Outlook recalculates the value for every item each time the view refreshes.
Does the formula field work in search folders?
Yes, search folders support formula fields, but the same limitations apply – you can only reference fields that are available in that search folder’s view. If the field is not listed, the formula will return empty.
What is the difference between a user defined field and a formula field?
A user defined field is a custom property you add to an item, like a text box or number that you fill in manually. A formula field is a calculated column in a view that derives its value from other fields. They serve different purposes: user defined fields store data, formula fields compute data on the fly.
Related
Formula used
in t | Finish time | min | 50 | 0 in d | Distance | km | 10 | 0 out pace | Average pace | min/km | t / d | 2 out speed | Average speed | km/h | d / (t / 60) | 2
Each line is one input (in, sel, list) or one result (out: label, unit, formula, decimals). How the calculators work
Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.