INFO()

Syntax. INFO(type_text)

Definition. This function returns information about the operating system and Excel.

Arguments

  • type_text (required). A string that specifies the type of information required

BackgroundTable 11-5 shows the information returned by this function for different type arguments.

Table 11-5. String Arguments and Their Meaning

Argument

Return Value

memused

Memory used by Excel, in bytes.

memavail

Available memory, in bytes.

totmem

Total memory, in bytes, including the used memory.

recalc

Recalculation mode for the current workbook as specified in the Options dialog box: Automatic or Manual (text).

numfile

Number of active worksheets in the open workbooks and loaded add-ins.

system

Name of the operating system (pcdos for Windows and mam for Mac).

osversion

Version of the operating system (the cell content is formatted as text).

origin

Returns the absolute reference of the upper-left cell in the current window based on the current scrolling position. This argument has the prefix $A: (text).

version

The version of Excel as text.

directory

The path of the current directory or folder.

Tip

The storage information refers to Excel and is not related to the information in the Windows Task Manager.

Note

Excel Help in Excel 2007 and earlier versions contains the following safety note:

Use this feature with caution. Sensitive or confidential information could be revealed to other users.

Examples. The following examples show how this function is used.

XML Functionality. Assume that you want to create at note to alert the user that the functionality for XML lists is not available in Excel 2003 or previous versions. You can add a note to a cell (for example, on a cover sheet) by using INFO(version) within an IF() function.

Because the INFO() function returns text, a number comparison might fail. Alphabetically sorted, the string 11.0 is greater than 10.0 but smaller than 9.0! For this reason, the formula is more complex:

=IF(VALUE(REPLACE(INFO("version"),FIND(".",INFO("version"),1),1,","))<11, "Excel is
not XML-enabled.","You can use the XML function.")

The FIND() function returns the position of the period in the version number, and the REPLACE() function replaces the period with a comma. The VALUE() function converts the returned text into a number that is compared with the number 11.

Creating a Link. You can use the INFO() and HYPERLINK() functions to create a link to the current directory:

=HYPERLINK(INFO("directory"))

This works in Windows XP, but in Windows Vista you have to remove the last backslash if B11 contains the information:

=HYPERLINK(LEFT(B11,LEN(B11)-1))

The formula

=HYPERLINK(LEFT(INFO("directory"),LEN(INFO("directory"))-1))

doesn’t work.

See Also

CELL()

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.116.60.62