Welcome to MSDN Blogs Sign in | Join | Help

Formula editing improvements Part 2: Formula AutoComplete

Last post I covered improvements we made to a long-time fixture of the Excel UI - the formula bar.  Today I’d like to introduce a feature that is brand new for Excel 12.  The feature is called Formula AutoComplete, and it is designed to make users more efficient.   Specifically, when we designed Formula AutoComplete, we had three goals:

  1. Help users build formulas faster
  2. Help users build formulas without needing to rely on external help
  3. Accomplish goals 1 and 2 in a way that is not intrusive or annoying

For guidance on the user experience we also looked to applications like Excel’s own VBE and Visual Studio, and we made sure to standardize where possible.   

How it works
Formula AutoComplete consists of a drop down list of items matching the customer’s keyboard input.  Each item type in the list has its own icon to visually distinguish it.  (The icons you see in the pictures below are works in progress and not final).  

This behaviour is probably best explained with an example.  Let’s walk through the process of building the following formula with Formula AutoComplete:

=SUBTOTAL(109, data)

To start, I will do what I always do when creating a formula – type an “=” sign.  For this example, I want to insert the SUBTOTAL function, so I begin with the letter “s”.  Upon typing the letter “s”, the Formula AutoComplete drop down immediately appears and displays a list of options that start with the letter “s”.   The first option in the list (in this case the SEARCH function) is selected and displays a description in a tooltip.   At this point, I could insert this function into the cell by hitting the TAB key or double clicking on the item.


(Click to enlarge)

Instead, I keep typing.  By the time I have typed “sub”, the list is filtered down to contain only the items starting with “sub” – SUBSTITUTE and SUBTOTAL.   I can navigate down to the SUBTOTAL function by using the up and down ARROW keys.   The descriptive tooltip confirms that this is the function I’m looking for. 


(Click to enlarge)

To insert the SUBTOTAL function, I simply need to press the TAB.  AutoComplete inserts the opening parenthesis in addition to the function name, and puts my cursor in the first argument of the function.  In this case, the first argument (function_num) has a specific set of values to select from.   AutoComplete makes it easy to choose one by displaying a list of the valid arguments when my cursor enters the argument.  In this case, I want the SUM option (109), so I’ll select it and hit TAB to insert.   Without auto-complete, I would have to either commit this list to memory or else consult help to get the correct value.


(Click to enlarge)

The final argument for the SUBTOTAL function is the reference to the data I want to subtotal.  For this example, I would like to subtotal a Named Range that I have already defined and called “data”.   As before, typing “d” displays the AutoComplete list filtered to items starting with the letter “d”.   Notice that the named range, “data” shows up at the top of my list with a different icon.  This icon indicates that it is a defined name. All items of the same type will share an icon.  Finally, you will notice that the selected item “data” is displaying a tooltip reading “this is the subtotal range”.  I added this comment to the name when I created it.  All name comments are displayed in auto complete tooltips making it easy to add and view useful metadata for defined names (more soon on name improvements).


(Click to enlarge)

After inserting the Named Range “data” and I just need to close the parenthesis.


I hope this simple example shows how helpful AutoComplete can be for building formulas.   In addition to requiring less typing, it puts more of the formula building knowledge directly into the product giving customers the luxury browsing their options rather than memorizing them.

One important point to note is that AutoComplete is meant to be a non-disruptive tool for building formulas.  Users can write formulas the existing way (by typing them all in by hand) if they choose, and AutoComplete will not stop them.  The feature will simply display a list of options matching what they type until there is nothing matching (at which point it will disappear).  Also, Formula AutoComplete can be turned on & off from Excel Options or by keyboard shortcut.

What does it autocomplete?

Here is a complete list of the items that will appear in the Formula AutoComplete drop down:

  • Excel functions – this includes all functions in the Excel library
  • User defined functions – Functions defined by the user either through VBA, automation add-ins, or .XLL’s show up as functions
  • Defined Names – All defined names are surfaced
  • Enumerated Arguments – Some enumerated arguments (like the function_num argument in the example) will have auto complete support
  • Table Structure References – More on this in post coming soon about improved table support.

 


Published Wednesday, October 19, 2005 2:59 PM by David Gainer

Comments

# re: Formula editing improvements Part 2: Formula AutoComplete

Wednesday, October 19, 2005 6:53 PM by Jon Peltier
Intellisense in the worksheet. Awesome.

# re: Formula editing improvements Part 2: Formula AutoComplete

Wednesday, October 19, 2005 6:53 PM by Jordan Windebank
I get the impression that this is sort of like how Visual Studio works with autocomplete of syntax? I like this very much.

Looking forward to Excel 12 more and more daily.

Cheers,
Jordan

# re: Formula editing improvements Part 2: Formula AutoComplete

Wednesday, October 19, 2005 8:07 PM by Graham
So... please help me understand why you're using a function number rather than just the name of a function. When we're skimming through a sheet, or looking at a print out of formula view, we'll have to have learned which numbers refer to which functions, won't we? Or am I missing the point completely..?

G

# re: Formula editing improvements Part 2: Formula AutoComplete

Wednesday, October 19, 2005 8:13 PM by Rob van Gelder
David,

Nice work on autocomplete!


I should have asked in my previous post:
Will there be a 'beautifier' for formulas?
That is, a feature which formats/tabs/indents formulas for easier reading -like the AudXL addin on my website (screenshots incl.)?

Rob

# re: Formula editing improvements Part 2: Formula AutoComplete

Wednesday, October 19, 2005 8:30 PM by Step
Beautiful ... (wipes tear from eye). I can't wait to start using Office 12!

# re: Formula editing improvements Part 2: Formula AutoComplete

Wednesday, October 19, 2005 9:21 PM by Biff
"Excel functions – this includes all functions in the Excel library "

Does that include functions from the ATP?

Are automatic tooltips avaiable for ATP functions in this version?

Is this drop down moveable?

# re: Formula editing improvements Part 2: Formula AutoComplete

Thursday, October 20, 2005 12:56 AM by David Gainer
Howdy

Graham, perhaps I wasn’t clear. In the example, the number is an argument to the SUBTOTAL function that specifies what sort of subtotal to create – in the case of our argument, it specifics we want a SUM. That isn’t a change from previous versions of Excel – it is the authoring UI that has been improved, so that instead of having to look up the arguments for SUBTOTAL in help every time you use the function, you can just pick from a list. If you were using a function that doesn’t have enumerated arguments, like SUM, you wouldn’t see the numbers. When you look at formulas in the worksheet, they will be the same as in Excel 2003.

Jordan, yes, you are correct.

Rob, no, we haven’t done work in that specific area this time out.

Biff, yes this includes the ATP (more on that tomorrow). No, the drop down is not movable, but I think when you use it, you will find that it is not obtrusive.

# re: Formula editing improvements Part 2: Formula AutoComplete

Thursday, October 20, 2005 1:25 AM by Harlan Grove
For the curmudgeons among us, will there be any way to disable this functionality like there is in the VB Editor (Options dialog, Editor tab, uncheck Auto Quick Info)?

# re: Formula editing improvements Part 2: Formula AutoComplete

Thursday, October 20, 2005 2:33 AM by Graham
Thanks David - now I understand - I wasn't familiar with the subtotal function from Excel 2003. My mistake, thanks for the clarification.

G

# re: Formula editing improvements Part 2: Formula AutoComplete

Thursday, October 20, 2005 2:54 AM by DavidL
This sounds great! However, if you want to achieve goal 2, not relying on external help for formulas as much, wouldn't it be good if AutoComplete also listed suggestions for internal functions that had the text typed in _part of_ its name? That is, if I know that I want to insert some kind of total function, I can start writing "TO" and see "SUBTOTAL" in the AutoComplete list. Then, if I type something that doesn't even match anything, like "STANDARD", the list could expand to a fulltext search of the online help and suggest "STDEV".
I know, this isn't how VS IntelliSense works, but this is Excel, free to innovate.
On the same note, I wish that Excel could be more helpful when I made an error in the formula. For example, if I use "STDEV" in Swedish Excel, it will simply display a "#NAME?" error ("#NAMN?", actually), but I will have to search the help myself to find that I really should write "STDAV", because the Swedish word for "deviation" is "avvikelse". For localized versions of Excel, it would be nice if it tried to match unknown function names with the English built-in functions and suggest the localized counterpart, if there is one. Also, other "soft" methods here, like trying to match part of function names or search the online help, are probably better than what we have today.

# re: Formula editing improvements Part 2: Formula AutoComplete

Thursday, October 20, 2005 3:04 AM by Colin Walker
This just keeps getting better an better - Office 12 is going to be awesome. I just hope I get on the beta.

# re: Formula editing improvements Part 2: Formula AutoComplete

Thursday, October 20, 2005 3:06 AM by TJM
Hi, the more I read about this the more I'm looking forward to the new version - just hope we have better luck convincing our IT departments to update than from XP to 2003!

1. The function number for SUM is different here (109) to that in Excel XP (9). What's the reasoning behind the change and are there conversion issues being introduced here?

2. Out of curiousity, the drop-down lists for the "ref1" parameter in your screen shot don't indicate you can type in / select a worksheet range. Which I would have thought was a common enough use of the function to merit showing up somewhere prominent on the drop-down? Do you not think less experienced users might treat the drop-down as an exclusive list of options?

# re: Formula editing improvements Part 2: Formula AutoComplete

Thursday, October 20, 2005 3:28 AM by Charles Williams
Great stuff. I am eagerly looking forward to seeing what you have done in the revised Defined Name dialog.

Does anything happen if you right-click an entry in the Auto-complete drop-down?

# re: Formula editing improvements Part 2: Formula AutoComplete

Thursday, October 20, 2005 5:08 AM by Paul Morriss
I like this, but can I turn it off? Most of the time I'm using a very limited range of functions and I know just what I want.

# re: Formula editing improvements Part 2: Formula AutoComplete

Thursday, October 20, 2005 6:07 AM by Jan Karel Pieterse
Hi David,

Great enhancement to the formula editing indeed.

One remark/question about the autocomplete:

Now it filters by the characters entered, hiding the other entries. Why not do it the same as the VBE intellisense: just scroll to the matching one and keep the other in sight?

Regards,

Jan Karel Pieterse
Excel MVP

# re: Formula editing improvements Part 2: Formula AutoComplete

Thursday, October 20, 2005 6:24 AM by Jean-Marc Decouleur
"User defined functions – Functions defined by the user either through VBA"

How will we be able to provide the comment that appears in the descriptive tooltip?

Also, is the AutoComplete feature available only when in-cell editing is done? What about editing done in the formula bar?

Thanks.

# re: Formula editing improvements Part 2: Formula AutoComplete

Thursday, October 20, 2005 7:04 AM by Marcos Martins
Interesting.

# re: Formula editing improvements Part 2: Formula AutoComplete

Thursday, October 20, 2005 7:21 AM by Jim Rech
TJM-

In Excel 2003 the Subtotal function was enhanced with additional function numbers 101-111. These match exactly the purpose of the existing function numbers 1-11 except they ignore manually hidden rows. So you know the older functions ignore rows hidden via a filter but not those manually hidden. I believe this enhancement was made because of the new List feature in Excel 2003.

# re: Formula editing improvements Part 2: Formula AutoComplete

Thursday, October 20, 2005 8:38 AM by SteveA
Hi David
Feature looks good
How are you going to handle a function like Match, which has one argument match_type, which can takes values -1, 0, 1. I can never remember which value means what, and have to revert to help. Even current dialog box only lists the values and not what they mean.
OK so a minor point, but nice to improve if possible

# re: Formula editing improvements Part 2: Formula AutoComplete

Thursday, October 20, 2005 10:52 AM by Colin Banfield
<<I should have asked in my previous post:
Will there be a 'beautifier' for formulas?
That is, a feature which formats/tabs/indents formulas for easier reading -like the AudXL addin on my website (screenshots incl.)? - Rob<<

<<Rob, no, we haven't done work in that specific area this time out.<<

A shame. For Excel 13 then, I have a request along the folling lines:

A dialog box like the one in Rob's addin would be useful for creating complex formulas, with features such as: 1) indenting, 2) parentheses matching (like entering a formula on the worksheet), 3) displaying the current cell reference value by hovering the cursor over a cell reference in the dialog box, 4) a button that displays the Evaluate Formula dialog box for testing the completed formula, 5) any other tools to help make building complex formulas easier.

Also, I wish there was a way to create UDFs in a dialog box within Excel, without having to invoke VBA functions. Two reasons for this: 1) Better calculation speed if you're using the function or functions in a lot cells on a large workbook, 2) For the average user, one shouldn't have to be familiar with VBA or switch to a VBA IDE to create a custom function (although the current functionality should still be available).

Colin



# re: Formula editing improvements Part 2: Formula AutoComplete

Thursday, October 20, 2005 2:08 PM by Tianwei
Nice feature means to make formula entering very user-friendly. Why not go all the way to display the full help text for each argument as the argument is being entered? (and to a prior commentator's point, allow an option somewhere to disable the feature)

Perhaps a future enhancement note: when an argument is enters, have a different screen shows where the reference is actual at (for example, if a name is entered, the screen shows the blinking dotted line around the range the name refers to). Many times the names defined are very similar so it's easy to mis-enter one when there are a lot of names defined (pardon my lack of imagination when naming the names)

# re: Formula editing improvements Part 2: Formula AutoComplete

Thursday, October 20, 2005 3:33 PM by simon murphy
Nice one David!
(F1 will take you to context sensitive help right?)
I take Grahams point about using the name rather than the function number - I'm guessing this is a backwards compatibility issue?)
cheers
Simon

# re: Formula editing improvements Part 2: Formula AutoComplete

Thursday, October 20, 2005 5:10 PM by David Gainer
Greetings everyone.

Harlan, Paul – Yes, there is an option and there is also a keyboard shortcut to turn Formula AutoComplete off if you like. Paul, we believe that even if you know what you want, there are efficiency gains using this feature to insert functions rather than typing them out (fewer keystrokes needed).

DavidL – Thanks for the feedback. One place you can already search for functions is the Insert Function dialog. Also, I think Formula AutoComplete will actually help out in the situation that you describe in the second half of your question, as you will be able to see the function you are typing doesn’t exist before you finish.

TMJ – Formula AutoComplete does not autocomplete cell references, however you can type anything you want at any time. Like visual studio and VB in Excel, this is a feature to help you, but it doesn’t control what you type. Our testing to date indicates users will not feel limited to the options in the drop down; we will do further testing and be looking at beta feedback as we progress.

Charles – Nothing happens if you right-click.

Jan Karel – We felt that it was better to reduce complexity by filtering out items than just scrolling a large list. What would be your reasoning for wanting the VS behaviour (other than consistency)?

Jim – Thanks for the explanation of the additional function numbers.

SteveA – In addition to showing the numerical value, we will display a text string explaining them, much like the subtotal example above. That should help.

Colin, Tianwei – Great feedback, thanks.

Simon – I will take a look. Correct on the backwards compatibility point.

# re: Formula editing improvements Part 2: Formula AutoComplete

Thursday, October 20, 2005 10:49 PM by Bob Whiton
Our product uses 'hidden' Defined Names. Will they surface in the auto complete? (Hope not!)

Awesome feature!

# re: Formula editing improvements Part 2: Formula AutoComplete

Friday, October 21, 2005 4:27 AM by Jean-Marc Decouleur
David - Seems you forgot my questions ? ;-)

"User defined functions – Functions defined by the user either through VBA"
How will we be able to provide the comment that appears in the descriptive tooltip?

Also, is the AutoComplete feature available only when in-cell editing is done? What about editing done in the formula bar?

Thank you.

# re: Formula editing improvements Part 2: Formula AutoComplete

Friday, October 21, 2005 6:03 AM by Jan Karel Pieterse
David:

"Jan Karel – We felt that it was better to reduce complexity by filtering out items than just scrolling a large list."

I get that, good point.

"What would be your reasoning for wanting the VS behaviour (other than consistency)? "

Well, just because one sometimes makes a typo (without actually looking at the autocomplete list). As it is now, you'd end up with an empty (disappeared?) list, in the other case, you'd probably be close to the entry you actually needed.

# re: Formula editing improvements Part 2: Formula AutoComplete

Friday, October 21, 2005 7:01 PM by David Gainer
Bob – No, hidden names do not surface in Name Autocomplete. I look forward to your feedback on my next post (name management improvements).

Jean-Marc – I am very sorry; not sure how I missed your questions the first time. Yes, Formula Autocomplete is also available when editing in the formula bar. Also, if you write UDFs using XLLs, we will display the function description as a tooltip. VBA and automation add-in UDFs will not have descriptive tooltips.

Jan Karel – thanks for the feedback.

# re: Formula editing improvements Part 2: Formula AutoComplete

Sunday, October 23, 2005 12:19 PM by Matthew
David,
I can't help but smirk each time you roll out another fantastic new feature; this'll help no end.

Just one suggestion, some of the PHB's I work with could get seriously confused by formula autocomplete showing the argument lists of UDFs I've created in VBA, should they happen to type something with the same starting letters.

At the same time I wouldn't want the overhead of including VBA to switch formula autocomplete off & on upon open/close (in every file where this might apply)

Can we have an solution to prevent UDFs only from being included in formula autocomplete?

Thanks again.

# re: Formula editing improvements Part 2: Formula AutoComplete

Tuesday, October 25, 2005 11:18 PM by David Gainer
Hi Matthew - We only show the UDF function name in the Auto complete drop down list ... we don't auto complete any UDF arguments. Currently, we don't have an off switch for showing UDFs in F AutoComplete.

# re: Formula editing improvements Part 2: Formula AutoComplete

Friday, October 28, 2005 11:46 AM by nicolas
Sir,

You absolutely need to open this intellisense to allow user to complete with their own metamodel.

Say I defined a range called "mytimeserie" and I type it via some system as a Financial Time Serie. That class has properies like volatility, mean, etc..

I WANT to be able to type in "mytimeserie." and have completion. furthermore, I want to be able to attach specific helper, parameter validator, suggestion, for a user function, like "mytimeserie.volatility(" and to display a calendar for I know that is the type of the 1st parameter.

Exposing metamodel and providing standard extension point is absolutely crucial for ease of use.

Nicolas

# CUBE Functions 3: Formula AutoComplete revisited

Thursday, February 09, 2006 7:05 PM by Microsoft Excel 12
Previously when discussing CUBE functions, I showed a couple of examples of reports based on OLAP data...

# Fun With Tables &raquo; Wagalulu - Microsoft &raquo; &raquo; Fun With Tables

# Microsoft Excel Formula editing improvements Part 2 Formula AutoComplete | Outdoor Ceiling Fans

# Microsoft Excel Formula editing improvements Part 2 Formula AutoComplete | Outdoor Ceiling Fans

New Comments to this post are disabled
 
Page view tracker