How to Info Function in Excel

Learn multiple Excel methods to info function with step-by-step examples and practical applications.

excelformulaspreadsheettutorial
11 min read • Last updated: 7/2/2025

How to Info Function in Excel

Why This Task Matters in Excel

Have you ever needed to know which drive letter a colleague saved the shared workbook to? Or perhaps you were writing formulas that must behave differently depending on whether the file is being opened on Windows or macOS. In countless business settings, understanding the spreadsheet’s environment is crucial. Finance teams often build large budgeting templates that break unless users work in automatic calculation mode; operations analysts need the local directory path to automatically pull external data; power users create dashboards that display the company logo only if the workbook opens on a specific network drive. All these scenarios rely on discovering facts about Excel’s operating context, and the quickest, formula-only way to surface that information is the INFO function.

INFO retrieves details about the current operating system, recalculation mode, directory path, memory allocation, and more. In a corporate environment where hundreds of users open the same file on different PCs, knowing those details lets developers safeguard formulas, trigger warnings, or automatically adjust code paths. For example, an IT audit workbook can log every user’s machine type and Excel version for compliance tracking. A data-heavy report might refuse to run complex calculations if the user’s memory allocation is too low, preventing crashes and lost work. Marketing teams distributing price books across regional offices can embed a small INFO-based note that immediately shows the current workbook location, making version control easier.

Excel is uniquely suited for this job because formulas calculate instantly and can push environment data directly into your workbook logic—no VBA or external tools required. Compared with manual user checks, the INFO function provides a real-time, zero-effort snapshot of the environment every time the file recalculates. Not knowing how to access this information could mean spreadsheets that fail silently, slow down under manual recalculation, or deliver wrong numbers because they connect to the wrong file path. Mastering INFO also complements other skills such as formula auditing, dynamic named ranges, and error handling since environmental data often dictates how those features should operate.

Best Excel Approach

For most day-to-day needs, the native INFO function is the most direct method to fetch environment details. It is simple, requires only a single text argument, and recalculates automatically without any permissions issues. Employ INFO when you want real-time data about the directory path, recalculation mode, Excel version, or platform type. It is especially valuable in shared workbooks because it adapts to each user’s setting.

Syntax:

=INFO(type_text)

Parameter

  • type_text – A text string enclosed in quotes that specifies which piece of information Excel should return.

Common values for type_text:

  • \"directory\" – Full path of the current or last active workbook
  • \"osversion\" – Operating system details
  • \"origin\" – Coordinates of the top-left cell on the current sheet
  • \"recalc\" – Calculation mode (\"Automatic\", \"Manual\", \"Automatic except tables\")
  • \"release\" – Excel release number
  • \"system\" – Operating environment (\"pcdos\", \"mac\", \"motif\")
  • \"numfile\" – Number of active worksheets in open workbooks
  • \"memavail\", \"memused\", \"totmem\" – Available, used, and total memory (Windows only)

Use INFO when you need a one-cell answer. If you require more granular file data, or if you want to obtain properties such as workbook name or sheet name, combine INFO with the CELL function or TEXTAFTER. For full automation or deeper system interrogation, VBA is a valid alternative, but it introduces macro-security complications and breaks compatibility with some cloud platforms. INFO remains the safest, most portable solution.

Parameters and Inputs

INFO accepts exactly one required argument—type_text—which is a quoted string. Excel will not accept a reference to a cell containing the word halfway through your formula; you either embed the string directly or build it with concatenation such as =\"mem\"&\"avail\". Valid inputs are case-insensitive, but spelling must be exact. If you pass an invalid keyword, INFO returns the #VALUE! error.

Data preparation is minimal: you simply need a workbook open. However, memory type_text keywords (\"memavail\", \"memused\", \"totmem\") and \"osversion\" only work on Windows. On macOS, they return #N/A. \"numfile\" counts every sheet in every open workbook, even hidden ones, so be aware when multiple files are open. The \"directory\" keyword returns the path of the active workbook when the formula calculates, not necessarily the workbook in which the formula resides, so context matters.

Edge cases include:

  • Closed workbooks: INFO cannot return the directory path of a file that is not open.
  • Manual calculation: If calculation is set to manual, the \"recalc\" keyword still returns \"Manual\", but the formula itself does not recalc until you press F9, potentially leading to stale directory paths.
  • Shared cloud paths: OneDrive and SharePoint can prepend \"https://\", resulting in very long strings—truncate with TEXTBEFORE if needed.

Step-by-Step Examples

Example 1: Basic Scenario

Imagine you maintain a simple price list workbook that 50 sales reps open daily. To help those reps confirm they have the correct version, you want to show the file’s folder path in cell B2.

  1. Open your workbook and select cell B2.
  2. Enter:
=INFO("directory")
  1. Save and close the file.
  2. Reopen it to watch the formula populate automatically with something like: C:\Users\John\OneDrive\Sales\PriceList\

Why it works: INFO reads Excel’s internal variable containing the active directory whenever the file calculates. This means every user sees their own local or network path. If they moved the file, the path updates, so no one accidentally edits an outdated copy on their desktop.

Common variations:

  • Display only the folder name by combining TEXTAFTER:
=TEXTAFTER(INFO("directory"), "\", 3)
  • Extract the drive letter:
=LEFT(INFO("directory"),2)

Troubleshooting: Reps may report seeing an empty string. That typically happens when their workbook has never been saved; INFO(\"directory\") will show the last active directory, which could be blank on a brand-new file. Have them save the workbook to any folder first.

Example 2: Real-World Application

A financial planning model uses massive data tables. To prevent accidental slowdowns, you want a warning banner if the workbook is in Manual calculation mode.

  1. Reserve cell A1 as a headline area. Type “Calculation Mode”.
  2. In cell B1, enter:
=INFO("recalc")
  1. In cell C1, add:
=IF(B1="Manual","⚠ Workbook is in Manual mode – press F9 to calculate","Ready")
  1. Apply conditional formatting to C1: Format cells equal to \"⚠ Workbook is in Manual mode – press F9 to calculate\" with bold red text and yellow fill.

Business context: In many finance teams, large consolidations run in Manual mode for speed. Unfortunately, less-experienced analysts may forget to recalc before distributing results. This setup makes the status obvious, preventing costly reporting errors.

Integration: Combine with a dynamic named range called CalcWarning that points to C1. Use:

=CalcWarning

inside a large title shape or a dashboard cell for consistent styling across sheets.

Performance: INFO itself has negligible impact on performance. The overhead here comes mainly from conditional formatting, but because it references only one cell, it scales well even in 50-sheet models.

Example 3: Advanced Technique

Suppose you distribute an Excel application that connects to an on-premises SQL database. Users on macOS cannot run the ODBC driver, so you want the workbook to disable connection buttons and show an alert on Mac machines.

  1. Create a new sheet called Control.
  2. In cell A2, enter:
=INFO("system")
  1. In cell B2, test for platform:
=IF(A2="mac","Mac","Windows")
  1. Name B2 as PlatformFlag (Formulas → Define Name).
  2. On any sheet containing the “Refresh Data” button, link the button’s Enabled property to:
=PlatformFlag="Windows"

(in older versions you control this through VBA; in Office Scripts or Power Automate you can test the cell value).

  1. Place a big notice in cell D2:
=IF(PlatformFlag="Mac","Database function disabled on Mac. Contact IT for alternatives.","")
  1. Wrap the notice inside conditional formatting to hide if blank.

Error handling: On macOS, INFO(\"system\") returns \"mac\". On Windows it returns \"pcdos\". For Excel Online, INFO returns \"pcdos\" because the service runs on Windows servers, so online users are treated as Windows. Decide upfront whether online users should see the Mac warning; if not, change logic to inspect Application.OperatingSystem via VBA.

Edge cases: Users with virtualization software such as Parallels may run Windows Excel on a Mac. INFO sees them as Windows, which is fine because ODBC works in that configuration. Always test across user populations.

Tips and Best Practices

  1. Always wrap INFO inside lower- or upper-case tests (UPPER(INFO("recalc"))="MANUAL") so you do not worry about capitalization differences across versions.
  2. Combine INFO with CELL to assemble full workbook diagnostics including file name, sheet, path, OS, and recalc mode—useful for help-desk tickets.
  3. Store INFO results on a hidden sheet called _Environment and reference named ranges elsewhere; this keeps worksheets clean and centralizes environmental logic.
  4. Avoid volatile functions next to INFO. Although INFO itself is non-volatile, pairing it with INDIRECT or OFFSET forces recalculation and can slow large models.
  5. If you plan to use memory keywords, account for #N/A on macOS by wrapping them in IFNA:
=IFNA(INFO("memavail"),"n/a on mac")
  1. Document every INFO use in a cell comment so future maintainers know why the file behaves differently on different machines.

Common Mistakes to Avoid

  1. Typo in type_text such as \"direcotry\"—Excel returns #VALUE!. Always validate with Data → Data Validation list of accepted keywords.
  2. Misunderstanding \"directory\" scope—users think it returns the workbook’s folder, but it returns the active folder; if a macro changes directories, the value shifts. Freeze it with a helper cell that recalculates only once.
  3. Relying on memory keywords on macOS—those keywords yield #N/A, leading to formula chains full of errors. Use IFERROR or IFNA wrappers.
  4. Forgetting manual recalc after changing calculation mode—placing INFO(\"recalc\") alone does not force recalc; you must press F9 or set Application.Calculate.
  5. Using INFO inside data models with Power Pivot—INFO is not supported in the DAX engine, so if you load the workbook into Power BI or Excel Data Model, those formulas will break. Keep environment logic on normal worksheets and not in tables loaded to the model.

Alternative Methods

While INFO is the easiest method, three other approaches exist.

MethodProsConsBest When
INFO()No code, portable, real-timeLimited to predefined keywordsQuick environment checks
CELL(\"filename\") etc.Works in all Excel versions, gives workbook/sheetNo OS info, no recalc statusNeed file name or path only
VBA: Application.OperatingSystem, Application.CalculationUnlimited details, can change settingsRequires macros, blocked by default securityControlled corporate environments
Office Scripts / Power AutomateCloud-friendly, modernOnly in Excel for the web, scripting knowledge requiredAutomating across SharePoint/Teams

Use CELL when you only need the workbook path or sheet name because it avoids path ambiguities that INFO(\"directory\") incurs. Choose VBA if you need to switch calculation mode programmatically, collect machine names, or log the user’s domain. Migrate from INFO to these alternatives by mapping each requirement: for OS, use Application.OperatingSystem; for directory, use ThisWorkbook.Path; for calculation mode, use Application.Calculation.

FAQ

When should I use this approach?

Use INFO when you need instant environment data directly in worksheet formulas without deploying macros. Typical cases are displaying calculation mode, confirming folder paths, or gating features by OS type.

Can this work across multiple sheets?

Yes. Place each INFO call once on a dedicated sheet, assign named ranges, and reference those names anywhere. This avoids duplicate calls and keeps formulas consistent.

What are the limitations?

INFO cannot return user names, machine names, or granular memory data on macOS. It is also unsupported in the DAX engine and Power BI, so avoid embedding INFO in data models.

How do I handle errors?

Wrap INFO in IFERROR or IFNA, especially for keywords not supported on every platform. For example:

=IFERROR(INFO("memavail"),"Not supported")

You can also cascade alternatives:

=IFERROR(INFO("directory"),CELL("filename"))

Does this work in older Excel versions?

INFO exists in all desktop versions back to Excel 4.0. However, the memory keywords were dropped from 64-bit Excel; they now return #N/A. Test across versions and wrap with IFNA.

What about performance with large datasets?

INFO uses negligible resources because it references internal variables and does not scan ranges. Still, avoid placing thousands of copies in large tables—reference a single named cell instead.

Conclusion

Learning to harness the INFO function equips you with an incredibly lightweight yet powerful tool for environment-aware spreadsheets. Whether you are guarding against manual calculation mishaps, debugging file paths, or tailoring features to different operating systems, INFO delivers real-time context with zero coding. Mastery of this task links seamlessly with broader Excel skills like error handling, dynamic dashboards, and secure file distribution. Start by adding one INFO status cell to your next model, expand into platform-specific logic, and you will soon be building workbooks that adapt intelligently to any user or environment.

We use tracking cookies to understand how you use the product and help us improve it. Please accept cookies to help us improve.