Please Note: This article is written for users of the following Microsoft Word versions: 97, 2000, 2002, and 2003. If you are using a later version (Word 2007 or later), this tip may not work for you. For a version of this tip written specifically for later versions of Word, click here: Determining an Integer Value.
by Allen Wyatt
(last updated October 19, 2013)
VBA, true to its BASIC roots, provides a function to return the integer value of an expression. This means that anything to the right of the decimal point is truncated. Thus, if a formula would normally result in a value such as 18.73, then the integer value of that formula would result in 18.
The syntax for the integer function is as follows:
x = Int(y)
where x is the result and y is a value or an expression that evaluates to a value.
WordTips is your source for cost-effective Microsoft Word training. (Microsoft Word is the most popular word processing software in the world.) This tip (3437) applies to Microsoft Word 97, 2000, 2002, and 2003. You can find a version of this tip for the ribbon interface of Word (Word 2007 and later) here: Determining an Integer Value.
The First and Last Word on Word! Bestselling For Dummies author Dan Gookin puts his usual fun and friendly candor back to work to show you how to navigate Word 2013. Spend more time working and less time trying to figure it all out! Check out Word 2013 For Dummies today!
Want to change the ToolTip that appears when you hover the mouse over a button on a toolbar? It's a bit more involved ...Discover More
If you want a list of all the fonts used in a document, the answer isn't as simple as you may think. This tip uses macros ...Discover More
If you know how to create macros, you can easily create entire replacements for Word's internal commands. Here's all you ...Discover More
FREE SERVICE: Get tips like this every week in WordTips, a free productivity newsletter. Enter your address and click "Subscribe."
Got a version of Word that uses the menu interface (Word 97, Word 2000, Word 2002, or Word 2003)? This site is for you! If you use a later version of Word, visit our WordTips site focusing on the ribbon interface.