 # Lost Excel Functions

Share

## Undocumented, Unloved and Unused Excel Functions

Following on from Chandoo’s MLookup function published on 1st April 2011, I thought it might be worth documenting a few undocumented, no-longer documented and rarely used Excel functions.

Although some of the functions below aren’t documented they still work as of Excel 2010.

Users should be cautious with their use going forward as Microsoft may withdraw them from future versions of Excel.

But if you see them appear in older Excel models at least you’ll be the full bottle.

This post will look at the following functions:

• Datedif
• Roundup
• RoundDown
• Evaluate
• Convert
• Roman
• FactDouble
• Bahttext

Worked examples of all these functions are presented in the Example File which is compatible with all versions of Excel.

## Datedif

The DATEDIF function computes the difference between two dates in a variety of different intervals, such number of years, months, or days.

This function is available in all versions of Excel since at least version 5/95, but is documented in the help file only for Excel 2000.

By the way, do not confuse the DATEDIF worksheet function with the VBA DateDiff function.

### Use:

=DATEDIF(Start Date, End Date, Interval)

Where:
Start Date must be less than the End Date.

Interval is the interval type to return.

Interval value must be one of the following:

 Interval Meaning Description m Months Complete calendar months between the dates. d Days Number of days between the dates. y Years Complete calendar years between the dates. ym Months Excluding Years Complete calendar months between the dates as if they were of the same year. yd Days Excluding Years Complete calendar days between the dates as if they were of the same year. md Days Excluding Years And Months Complete calendar days between the dates as if they were of the same month and same year.

If you are including the Interval string directly within the formula, you must enclose it in double quotes:

=DATEDIF(Date1,Date2,”m”)

### Examples:

 Start Date 13/01/1963 End Date 12/05/2011 Years =DATEDIF(\$B\$5,\$C\$5,”Y”) 48 Months =DATEDIF(\$B\$5,\$C\$5,”M”) 579 Days =DATEDIF(\$B\$5,\$C\$5,”D”) 17651 Months Exc. Years =DATEDIF(\$B\$5,\$C\$5,”ym”) 3 Days Exc. Years =DATEDIF(\$B\$5,\$C\$5,”yd”) 119 Days Exc. Years & Months =DATEDIF(\$B\$5,\$C\$5,”mD”) 29 Start Date > End Date =DATEDIF(\$D\$5,\$D\$4,”Y”) #NUM!

### Use of the Datedif function on Chandoo.org:

Datedif has been used a number of times at Chandoo.org

http://chandoo.org/forums/topic/how-to-calculate-age-from-their-dob

http://chandoo.org/wp/2009/09/22/elapsed-time-excel/

http://chandoo.org/wp/2008/08/26/date-time-tips-ms-excel/

Disclaimer:

Although the Datedif function above isn’t documented it still works as of Excel 2010. Users should be cautious with their use going forward as Microsoft may withdraw support for them in future Excel versions.

## ROUNDUP() and ROUNDDOWN()

The Roundup and Rounddown functions rounds a number up or down, away from zero and have pretty much been replaced by the Round function.

### Use:

The Roundup function rounds a number up, away from zero.

=ROUNDUP(number, num_digits)

The Rounddown function rounds a number down, towards zero.

=ROUNDDOWN(number, num_digits)

Roundup() behaves similarly to the Round() function, except that it always rounds a number up based on the following rules:

• If num_digits is greater than 0, then number is rounded up to the specified number of decimal places.
• If num_digits is 0 or omitted, then number is rounded up to the nearest integer.
• If num_digits is less than 0, then number is rounded up to the left of the decimal point.

### Examples:

ROUNDUP(4.1,0) equals 5

ROUNDUP(106.9,0) equals 107

ROUNDUP(3.14159, 3) equals 3.142

ROUNDUP(-3.14159, 1) equals -3.2

ROUNDUP(31415.926, -2) equals 31500
Rounddown() behaves similarly to the Round() function, except that it always rounds a number down based on the following rules:

• If num_digits is greater than 0, then number is rounded down to the specified number of decimal places.
• If num_digits is 0 or omitted, then number is rounded down to the nearest integer.
• If num_digits is less than 0, then number is rounded down to the left of the decimal point.

### Examples:

ROUNDDOWN(4.1, 0) equals 4

ROUNDDOWN(106.9,0) equals 106

ROUNDDOWN(3.14159, 3) equals 3.141

ROUNDDOWN(-3.14159, 1) equals -3.1

ROUNDDOWN(31415.92654, -2) equals 31400

### Use on the Roundup and Rounddown functions on Chandoo.org:

The Roundup and Rounddown functions have been used several times at Chandoo.org

Roundup

http://chandoo.org/wp/2010/04/29/quarterly-totals-from-monthly-data/

http://chandoo.org/wp/2010/04/30/quarterly-totals-multi-year-data/

Rounddown

http://chandoo.org/wp/2010/04/30/quarterly-totals-multi-year-data/

http://chandoo.org/wp/2009/07/06/excel-formulas-round-sort/

## Evaluate

Evaluate is an Excel ver 4.0 macro function which is still supported and functional in Excel 2010.

The Evaluate function allows for the evaluation of a text equation as an algebraic equation.

The evaluate function cannot be used as a spreadsheet function but can be used in Named Ranges.

It is probably best described by example; Evaluate 1, from the Example File.

### Example:

Say you have a polynomial equation in a cell as Text A1: ‘=X2 + 5*Y – Z

Setup 3 named ranges, X, Y , Z with values X=10, Y=5 and Z=3

You can use Evaluate in a a Named Range eg: Result =Evaluate(SheetName!\$A\$1)

And then on a worksheet =Result, which will return the answer 122 = 102 + 5*5 – 3

Evaluate can be used to allow graphing of equations without use of worksheet functions or even worksheet ranges, an example of each is shown in the examples file as Evaluate 2 and Evaluate 3 .

Evaluate 2: Uses a Range as the X Values and a Named Range using the Evaluate function as the calculated Y Values

Evaluate 3: Uses Named Ranges as the X Values and as the calculated Y Values based on an Evaluate function Use of the Evaluate function on Chandoo.org:

Not Used

## Convert

Converts a number from one measurement system to another.

For example, CONVERT can translate a table of distances in Kilometres to a table of distances in Miles.

Convert includes 49 units spread amongst the following 10 categories

 Category No Units Weights & Mass, 5 Time 5 Force 3 Power 2 Temperature 3 Distance 8 Pressure 3 Energy 9 Magnetism 2 Liquid Measures 9

### Use:

=Convert(number, From Unit, To Unit)

A list of all the Conversion Units and Conversion Prefixes is included on the Conversion Factors tab of the Examples File.

### Examples:

 Example Result Description (Result) =CONVERT(5, “lbm”, “kg”) 2.27 Converts a 5 pound mass to kilograms (2.267) =CONVERT(80, “F”, “C”) 6.67 Converts 80 degrees Fahrenheit to Celsius (26.6) =CONVERT(1, “ft”, “kg”) #N/A Data types are not the same so an error is returned (#N/A) ‘=CONVERT(CONVERT(100,”ft”,”m”),”ft”,”m”) 9.29 Converts 100 square feet into square meters (9.290304).

A list of all the Conversion Units and Conversion Prefixes is included on the Conversion Factors tab of the Examples File.

### Use of the Convert function on Chandoo.org

http://chandoo.org/forums/topic/convert-function

## Roman

The Roman function converts a number to Roman format.

### Use:

=ROMAN(number, form)

=ROMAN(45 ) = XLV

Form is a number specifying the type of roman numeral you want. The roman numeral style ranges from Classic to Simplified, becoming more concise as the value of form increases.

 Form Type 0 or omitted Classic. 1 More concise. See example below. 2 More concise. See example below. 3 More concise. See example below. 4 Simplified. TRUE Classic. FALSE Simplified.

### Example:

 Example Formula Description (Result) =ROMAN(2011) MMXI Converts 2011 to Roman (MMXI) =ROMAN(499,0) Classic or Omited CDXCIX Converts 499 to Roman (CDXCIX) =ROMAN(499, True) Classic CDXCIX Converts 499 to Roman (CDXCIX) =ROMAN(499,1) More Concise LDVLIV Converts 499 to Roman (LDVLIV) =ROMAN(499,2) More Concise XDIX Converts 499 to Roman (XDIX) =ROMAN(499,3) More Concise VDIV Converts 499 to Roman (VDIV) =ROMAN(499,4) Simplified ID Converts 499 to Roman (ID) =ROMAN(499, False) Simplified ID Converts 499 to Roman (ID)

Nil

## Factdouble

Factdouble returns the double factorial of a number and is expressed in mathematics as n!!

Double factorials are used in probability theory and other higher levels of mathematics and is really just a way to simplify an otherwise complex expression

If the number is Even Factdouble = n(n-2)(n-4)…(4)(2)

If the number is Odd Factdouble = n(n-2)(n-4)…(3)(1)

So it is simpler to write 10!! than 10x8x6x4x2

### Use:

=Factdouble( number )

### Example:

 Example Result Description (Result) =Factdouble(8) 384 Factdouble of 8 = 8x6x4x2 = 384 =Factdouble(9) 945 Factdouble of 9 = 9x7x5x3x1 = 945

Not used

## Bahttext

Converts a number to Thai Text represention of the number

Use:

=Battext( Number)

Not used

## Examples

An example file with worked examples from all the above functions is available from the following link; Example File

The file is compatible with all Excel versions.

## What Functions Have You Discovered?

What Functions Have You Stumbled Onto?

Let us know in the comments below:

### Get FREE Excel + Power BI Tips

Simple, fun and useful emails, once per week.

Learn & be awesome.

### Welcome to Chandoo.org

Thank you so much for visiting. My aim is to make you awesome in Excel & Power BI. I do this by sharing videos, tips, examples and downloads on this website. There are more than 1,000 pages with all things Excel, Power BI, Dashboards & VBA here. Go ahead and spend few minutes to be AWESOME.

Read my storyFREE Excel tips book

Excel School made me great at work.
5/5

– Brenda

Power Query, Data model, DAX, Filters, Slicers, Conditional formats and beautiful charts. It's all here.

Still on fence about Power BI? In this getting started guide, learn what is Power BI, how to get it and how to create your first report from scratch.

## Related Tips

### 39 Responses to “Lost Excel Functions”

1. Luke M says:

Of all the functions, I think the BAHTTEXT function is the biggest "Why is this here???"
It's use would be limited to a very, very small demographic. A better function would have been a generic translate function where you pick the language (even if it was only the top 5 or something...)

2. Kevin says:

Lost by whose definition? Some people use these functions(me). There are alot of words in English dictionary that aren't used.

3. Jordan Goldmeier says:

This is a great post, especially because I love Lost. Thanks!

4. ruve1k says:

See the following blog post on Excel Semi-Pro which identifies the flaws with the DATEDIF function.
http://excelsemipro.com/2011/01/how-many-years-months-and-days-has-it-been/?utm_source=feedburner&utm_medium=feed&utm_campaign=Feed%3A+ExcelSemi-pro+%28Excel+Semi-Pro%29

5. SteveT says:

Nice Post Hui. It is amazing what is in the program that you have never heard of. I typed in =d and looked at the functions. "Delta" popped out although it is documented, why would you ever use it vs. just comparing with an equal sign (=1=1).

6. Ninad Pradhan says:

I use Datedif at times. What will be nice is if alternatives to these "Lost" functions can also be posted with examples. That'll be a good reading and also deter users from using functions "soon to be made obsolete"

7. OlaSa says:

I don't think the intersect AND logic is very well documented:
=B1:B3 A2:C2 One intersection
=SUM(D9:F9 E8:F10) Two intersections
=SUM(D9:F9 E8:E10 F8:F10) No intersection --> #NULL! Not seen very often
There might be a OR logic lurking as well
//Ola

8. Fred says:

Interesting post! 😉

I found out that only "evaluate" isn't available in my excel 2007.

9. Prem Sivakanthan says:

Great post, thanks Hui! 🙂

10. Hui... says:

@Fred
Evaluate is a Excel 4 Macro Function and not a spreadsheet function
It can only be used in Named Ranges and VBA, not as a spreadsheet function.

@OlaSa
I forgot all about the 2 Operators you mention.
Daniel at Excel Hero has done a story about them at: http://www.excelhero.com/blog/2010/06/which-function-to-use---part-1.html

@Steve T
Yes, Delta and Gestep are odd functions and easily replaced with alternative logic.
These 2 functions may have uses in handling ranges and not just single cells.

11. juanito says:

I read somewhere not too long ago (at Daily Dose, possible) that BAHTTEXT is "rumoured" to be a self-interested joke by the MS Excel programmers: although this function would be at least equally useful for other currencies, they did the baht first because they're extremely partial to Thai takeaways and wanted to speed up the turnaround time

12. Alasdair says:

...and why isn't there a reverse ROMAN?

13. Jan Karel Pieterse says:

Hi Hui,

I think you have mis-defined the Result range name because you have made the name relative. The proper formula should have been
=EVALUATE(\$A\$1).
NB: I use the technique in this post: http://www.jkp-ads.com/articles/chartanequation00.asp

14. SteveT says:

Found this posting with some User Defined Functions and VBA for reversing Roman Numerals:

15. tra says:

Hi Hui - Thanks for the post - a little off the excel topic, but wondering what does "you"ll be the full bottle" mean? Have never heard this expression before. 🙂

16. Hui... says:

@Tra
“you'll be the full bottle” is Aussie slang for "You'll know all about it"

17. Hui... says:

@Jan Karel Pieterse
Thanx for the input
.
=Evaluate(A1) is ok as long as A1 is the active cell
It can create problems if it isn't.
.
Ideally it should be entered as =EVALUATE(SheetName!\$A\$1)
I have updated the post accordingly

18. Luke M says:

Further info on DELTA:
Have 1 cell formatted to number (a1), and the other formatted to text (a2).
Type the number 1 into both cells
The formula:
=A1=A2
returns FALSE (number does not equal text)
formula:
=DELTA(A1,A2)
returns 1 (the equivalent of true). I see limited places where this would be useful, but wanted to point out that they do function differently.

19. Hui... says:

In Excel2010
I just tried Delta with
2 2 =Delta(A2, B2) =1
'2 '2 =Delta(A3, B3) =1
'2 2 =Delta(A4, B4) =1
C C =Delta(A5, B5) =#Value!

Lines 3 & 4 should also give errors but don't ?

The formatting of the cells shouldn't affect the results as that is just for display

20. Ed says:

Great post.

Interesting that the roman function returns a #value! if you go any higher than 3999

21. Jordan Goldmeier says:

@Chandoo Not trying to be a shameless self promoter (I just want to spread the Excel awesomeness) but I've found an obscure way to create a mouse-over effect in Excel using the Hyperlink() formula and some VBA. I've used this technique in some of my dashboards at work, and as an example of how it's useful, you could use it in the Grammy Bump chart to simply let users rollover a year instead of clicking on it. I talk about it in the latest post of my rarely updated blog which is linked on my name in this post. Or, here's the long and short of it:
.
.
Then in some module:
Public Function MyFunction()
Msgbox "hi!"
End Function
.
To test: place your mouse over the underlined portion of the cell. To make the entire-cell a mouse over target (not just the underlined portion), word wrap it. Also, if you want the function to change parts of your spreadsheet, you'll need to wrap the Hyperlink formula in an IFERROR (you'll see what I mean when you try it). Or you can read about it by clicking on my name, either way, make sure to have fun!

22. Luke M says:

@Hui
Seems like DELTA has the advantage in being able to recognize "text as numbers". And yes, thanks for clarifying my statement about formatting. I should have been clearer in the fact that I just wanted to compare a text string with a number...in which case, maybe I should have just written:
=DELTA(1,"1") 'Results in 1

23. Chandoo says:

@Jordan... wow, that is a beautiful trick. I have not yet tested it, but seems like it has lots of potential. Let me play with the idea and may be write a follow-up article on this.

Btw, you are welcome to share information and links. That is the whole point of commenting. 🙂

24. SteveT says:

Alright, i am no engineer, but a simple formula can also do what Delta does without having a whole function for it. That is like creating a function called Add (Syntax =Add(a1,a2) that results in the addition of A1+A2

This will do what delta does on numbers and textNumbers and its not rocket science or structural engineering 🙂 🙂

=VALUE(A1)=VALUE(A2) will also yield true/false

And if you need the result as a number =(VALUE(A3)=VALUE(A4))*1

25. myckolah says:

@SteveT
You know, they invented this function you described in Excel. It is called SUM, not ADD 🙂
There are also functions PRODUCT, SUMPRODUCT and others. All of them simple definied, and it doesn't mean they aren't to be in Excel.

26. Doug Jenkins says:

Of the under-used functions, I think Evaluate is probably the most useful.

The short UDF presented here:
http://newtonexcelbach.wordpress.com/2008/04/22/evaluate-function/
allows Excel to evaluate functions entered as text, without the need to create named ranges.

27. Jaspal says:

thanks for this. I hope to use "convert" more frequently henceforth

28. Andrew says:

@ruvelk and @Chandoo

I checked out the link you provided (ruvelk) and the explanation given of the intervals 'MD' 'YM' AND 'YD' provided above (Chandoo) and the information is not quite correct.

'MD' returns the number of days since the last completed month.
'YM' returns the number of months since the last completed year.
'YD' returns the number of days since the last completed year.

As far as I can see there is no flaw in the function just perhaps a misunderstanding of what is does.

eg
using the 'MD' interval
02/28/2010 to 01/11/2011
Last completed month = 12/28/2010
Number of days between 12/28/2010 and 01/11/2011 = 14

Using 03/01/2010 to 01/11/2011
Last completed month = 01/01/2011
Number of days between 01/01/2011 and 01/11/2011 = 10

Cheers

Andrew

29. Hui... says:

@Andrew
I think we are talking about the same thing in different ways.

From the post:
"md" Days Excluding Years And Months Complete calendar days between the dates as if they were of the same month and same year.

28/2/10 to 11/1/11 will count 29, 30 and 31 as if they are in January and then the first 11 days in January = 14 days.
That is, it is counting the dates as if they are both in January, same year, and so there is 14 days between them.

30. Chandra SEkhar says:

Hi,

Can any one tell how to enter data into range of cells through a single cell without the help of VBA.

Regards
Chandra

• Hui... says:

@ Chandra
Can you be more specific?

31. Phil Bornemeier says:

@Chandra
If you type this into A1:
={1,2,3;4,5,6;7,8,9}
then select A1:C3 and use Control+Shift+Enter
You will get a 3x3 array in A1:C3
The formula in each cell in that range will be:
{={1,2,3;4,5,6;7,8,9}}

Commas separate columns.  Semicolons separate rows,

This is of limited use since the cells in this array cannot be individually edited.

32. Phil Bornemeier says:

There is at least 1 Excel 4 macro that provides functionality that cannot (AFAIK) be replicated in later versions of Excel.  GET.CHART.ITEM is used to get the exact coordinates of chart elements, including the coordinates of individual points in a line graph (or edge and corner cordinates of bars, or columns for those types of graphs).  For example:
sngXPos = ExecuteExcel4Macro("get.chart.item(1,1, ""S2P" & lX & """)")
returns the X position of each point in series 2 of a line graph as you iterate from 1 To ActiveChart.SeriesCollection(2).Points.Count

Documentation file for Excel4 macros available at:
http://support.microsoft.com/kb/128185

Excel 2010 has incorporated most (but not all?) of this functionality as described here:
http://blogs.office.com/b/microsoft-excel/archive/2010/02/16/migrating-excel-4-macros-to-vba.aspx

33. stansult says:

Unfortunately, I don’t see Evaluate working in Excel 2010.
I have Microsoft Office Professional Plus 2010.
When I try it myself, or download the example file, I have #NAME?
result in the cell containing “=Result” formula.

• Doug Jenkins says:

The Evaluate function does work in Excel 2010 and 2013.

It is called from a VBA function, so maybe the problem is that macros are not enabled.

34. […] To know how many months are left between TODAY() and date in A1, use = DATEDIF(TODAY(), A1, “m”). Related: How to use DATEDIF function. […]

35. […] To know how many months are left between TODAY() and date in A1, use = DATEDIF(TODAY(), A1, “m”). Related: How to use DATEDIF function. […]

36. Marty says:

I once ran across an undocumented version of GETPIVOTDATA. The syntax was something like "GETPIVOTDATA(\$A\$3, ...", where \$A\$# would reference the pivot table then you could concatenate text fields to select the specific data you were after. I found this useful as I could use an IF("condition", "place field text", ""). This way if the "condition" was met it would field data requested otherwise nothing was included. This worked well if nested condition were not available. Hope this is clear. I can't find the alternate syntax for GETPIVOTDATA anywhere. Does someone have it?

### Get FREE Excel & Power-BI Newsletter

One email per week with Excel and Power BI goodness. Join 100,000+ others and get it free.