Revenue (Historical) Formula in Excel

Are you looking for a quick and reliable way to pull historical revenue data into Excel? The Revenue (Historical) formula from MarketXLS helps you seamlessly fetch a company’s total revenue for a specified historical period. In this guide, you'll learn how to use this powerful function to enhance your financial spreadsheets.

Understanding Revenue (Historical)

  • Purpose: The Revenue (Historical) formula retrieves a company’s historical revenue directly in Excel.
  • Key Benefits:
    • Eliminate manual data entry for financial statements.
    • Stay updated with real-time historical fundamental data for better analysis.
    • Streamline your financial modeling process in Excel.
  • When to Use: Ideal for analysts, investors, and finance professionals who need to compare or trend revenue over different quarters and years.

Syntax and Parameters

Below is the syntax for using the Revenue (Historical) formula:

=hf_Revenue(Symbol, year, [quarter], [TTM])
Parameter Description Required Example
Symbol The stock or asset symbol. Yes "MSFT", ^SPX, @MSFT 110122C00020000, "BTCUSD:DEFAULT"
year The specific year or special codes like "lq", "ly", "lt" etc. Yes 2022, "ly", "lq-1"
quarter The calendar quarter (1 to 4). Defaults to "1". No 2
TTM Trailing twelve months indicator. Use "TTM" for TTM values. No "TTM"

?? Note: This formula requires a MarketXLS subscription with access to historical fundamental data.

Return Value

• Returns a numeric value representing the total revenue if found.
• Returns "NA" if data is unavailable or if an error occurs.

Error Handling

If the symbol is invalid or you lack the necessary subscription, the function returns "NA" instead of a numeric value.

Special Cases and Limitations

  • Passing an incorrect or unsupported symbol returns "NA".
  • For reliable results, ensure your subscription includes historical fundamental data.
  • Large data requests may take slightly longer depending on your connection and MarketXLS server load.

Examples and Usage

Below are some common ways to use Revenue (Historical):

  1. Using a cell reference for the year:
    =hf_Revenue("MSFT", A1)
  2. Hardcoding the year directly:
    =hf_Revenue("MSFT", "2022")
  3. Using special codes for the year (last quarter, last year, last 12 months):
    =hf_Revenue("MSFT", "lq")
    =hf_Revenue("MSFT", "ly")
    =hf_Revenue("MSFT", "lt")
  4. Specifying quarter and TTM:
    =hf_Revenue("MSFT", 2022, 3, "TTM")
  5. Using different symbol formats:
    • For an index:
      =hf_Revenue("^SPX", 2023)
    • For an option:
      =hf_Revenue("@MSFT 110122C00020000", "lq")
    • For crypto:
      =hf_Revenue("BTCUSD:DEFAULT", "ly-1")

? Pro Tip: Combine =TEXT(A1,"yyyy-mm-dd") for dates or special symbol formats if you’re dynamically setting parameters.

Common Questions

  1. Why does the formula return NA?

    • You might be using an invalid symbol or your subscription plan may not include the historical fundamentals feature.
  2. How do I use this for multiple companies simultaneously?

    • Simply reference different company symbols in separate cells, for example:
      =hf_Revenue(A1, 2022)
      =hf_Revenue(B1, 2022)
  3. Does the formula automatically update?

    • Yes, MarketXLS will refresh data based on your Refresh Settings in Excel or whenever you recalculate the spreadsheet.
  4. Can I pull data for partial years?

    • You can specify any valid quarter or trailing twelve months with parameters like 2 or "TTM".
  5. Is there any performance concern when using multiple calls?

    • Excessive, simultaneous data requests might slow down Excel. Consider refreshing in batches or using smaller sets of symbols at a time.

Happy analyzing with MarketXLS!