Excel Formula to Average Product Prices Ignoring Text and Errors

📅 Jul 22, 2026 📝 Sarah Miller

Managing product databases often leads to frustrating calculation errors when pricing sheets contain text placeholders like "N/A" or formula errors. While standard AVERAGE functions fail under these conditions and manual data cleanup drains valuable analytical time, relying on basic workarounds is unsustainable.

Implementing targeted Excel functions grants you the capability to automate flawless reporting by bypassing non-numeric obstacles entirely. Under the stipulation that your target range contains valid numeric prices alongside the errors, utilizing =AGGREGATE(1, 6, A2:A100) safely ignores all error values. Below, we will outline exactly how to deploy this formula to streamline your inventory metrics.

Excel Formula to Average Product Prices Ignoring Text and Errors

Managing inventory and product pricing sheets in Microsoft Excel is a fundamental task for retail managers, e-commerce specialists, and financial analysts alike. However, real-world datasets are rarely pristine. When compiling product pricing lists, you will frequently encounter columns peppered with non-numeric placeholders-such as "TBD", "Out of Stock", "On Request"-or worse, actual system formula errors like #N/A, #VALUE!, or #DIV/0!.

If you try to calculate a simple average of these prices using the standard AVERAGE function, Excel will either fail entirely and return an error code, or yield an incorrect calculation. In this comprehensive guide, we will explore the best Excel formulas to average product prices while seamlessly ignoring both text strings and formula errors, ensuring your business metrics remain accurate and automated.

The Root of the Problem: Why Standard AVERAGE Fails

To solve this issue, we must first understand how Excel's native AVERAGE function behaves under different conditions:

  • Standard Text: Surprisingly, Excel's AVERAGE function naturally ignores plain text cells (like "TBD" or "Pending") if they are passed as a range. For example, =AVERAGE(A1:A10) will skip cells containing text and average only the numbers.
  • Formula Errors: If even a single cell in your range contains an error code (such as #N/A from a failed VLOOKUP, or #VALUE! from a broken calculation), the AVERAGE function breaks down completely and returns that same error.

To illustrate, let's look at a typical product pricing table that we will use as our reference throughout this article:

Product ID Product Name Price (Column C) Status / Notes
P001 Wireless Mouse $25.00 Active
P002 Mechanical Keyboard TBD Pricing pending update
P003 USB-C Hub $45.00 Active
P004 HDMI Cable #N/A Supplier system error
P005 4K Monitor $350.00 Active
P006 Ergonomic Chair $0.00 Out of stock / Temp zero

If you run a basic =AVERAGE(C2:C7) on this dataset, Excel returns #N/A because of the error in cell C5. Let's look at the solutions to fix this.

Method 1: The Modern & Best Solution – The AGGREGATE Function

Introduced in Excel 2010, the AGGREGATE function is the most robust and elegant way to solve this problem. It allows you to perform calculations like average, sum, or count while specifying exactly what type of data you want to ignore.

The Formula:

=AGGREGATE(1, 6, C2:C7)

How It Works:

  • First Argument (1): This specifies the function we want to run. 1 stands for the AVERAGE function.
  • Second Argument (6): This is the "magic instruction." The code 6 instructs Excel to ignore error values.
  • Third Argument (C2:C7): This is the range of cells containing your product prices.

Because standard text like "TBD" is already ignored by the underlying average calculation, and the 6 option bypasses the #N/A error, this formula successfully isolates only the valid numeric prices ($25.00, $45.00, $350.00, and $0.00) and returns an accurate average of $105.00.

Method 2: Using AVERAGE with IFERROR (Legacy Array Formula)

If you are working on older versions of Excel or want a formula logic that is easy to customize for other criteria, combining AVERAGE with IFERROR is an excellent approach.

The Formula:

=AVERAGE(IFERROR(C2:C7, ""))

How It Works:

The IFERROR function scans the range C2:C7. When it encounters a cell with a numeric price or a standard text string (which Excel evaluates as safe), it passes the value through. When it encounters the #N/A error, it converts it to an empty string ("").

The outer AVERAGE function then takes this processed array and ignores both the text strings and the newly created empty strings, averaging only the remaining numbers.

Note on Excel Versions:

  • If you are using Microsoft 365 or Excel 2021+, you can simply type this formula and press Enter. Excel's dynamic array engine will handle it automatically.
  • If you are using Excel 2019 or older, you must enter this as an array formula by pressing Ctrl + Shift + Enter. When done correctly, Excel will wrap the formula in curly brackets: {=AVERAGE(IFERROR(C2:C7, ""))}.

Method 3: The FILTER and ISNUMBER Approach (Excel 365 & 2021)

For users of modern Excel, the combination of FILTER and ISNUMBER provides a highly transparent, dynamic array solution. This formula isolates and builds a temporary list of only the cells that contain actual numbers, then averages them.

The Formula:

=AVERAGE(FILTER(C2:C7, ISNUMBER(C2:C7)))

How It Works:

  1. ISNUMBER(C2:C7) checks each cell in our range and returns an array of TRUE or FALSE values. For instance, our range yields: {TRUE, FALSE, TRUE, FALSE, TRUE, TRUE} (remembering that text and error codes return FALSE).
  2. The FILTER function takes the original range and filters out anything that returned FALSE, leaving us with an array containing only the numeric prices: {25, 45, 350, 0}.
  3. Finally, the AVERAGE function calculates the mathematical average of this clean, error-free list.

This method is highly favored by modern Excel developers because it is easy to debug. You can test the FILTER part of the formula in an empty cell to physically see which numbers are being included in the calculation.

Advanced Scenario: Ignoring Errors, Text, and Zero Prices

In retail and product management, a price of $0.00 often doesn't mean the product is free; it usually indicates that the product is temporarily unavailable, discontinued, or has a missing price. Including zeroes in your average will skew your results downwards.

If you want to average your product prices while ignoring text, system errors, and zero values, you can use the modern FILTER function with multiple criteria:

The Formula:

=AVERAGE(FILTER(C2:C7, ISNUMBER(C2:C7) * (C2:C7 > 0)))

How It Works:

In Excel arrays, the asterisk (*) acts as an AND operator. This formula filters the range C2:C7 based on two strict conditions:

  1. The cell must contain a number (ISNUMBER(C2:C7)).
  2. The value inside the cell must be strictly greater than zero (C2:C7 > 0).

Applying this to our sample table, cell C7 (which contains $0.00) is filtered out alongside the text and error values. The formula will calculate the average of $25.00, $45.00, and $350.00, resulting in a cleaner, more realistic average of $140.00.

Summary of Methods: Which One Should You Choose?

Formula Method Excel Compatibility Ignores Text? Ignores Errors? Can Ignore Zeroes?
AGGREGATE Excel 2010 and newer Yes Yes No (unless filtered beforehand)
AVERAGE + IFERROR All versions (as CSE array in older versions) Yes Yes No
AVERAGE + FILTER + ISNUMBER Excel 365 / Excel 2021+ Yes Yes Yes (with expanded criteria)

Pro Tip: Keep Your Source Data Clean

While these formulas are incredibly helpful for working around imperfect data, relying heavily on them can sometimes mask systemic data entry or integration issues. If you find your spreadsheets constantly plagued by #VALUE! or #N/A errors, it is highly recommended to investigate the root cause.

For example, if you use VLOOKUP or XLOOKUP to pull prices from an external database, wrap those lookup formulas in an IFERROR or IFNA at the source level. Instead of letting raw error codes populate your data sheets, configure your lookups like this:

=XLOOKUP(A2, SupplierSheet!A:A, SupplierSheet!B:B, "")

By returning an empty string ("") instead of a native system error directly inside your data column, your standard AVERAGE formulas will work perfectly without requiring complex error-handling workarounds.

Conclusion

No matter which version of Excel you use, you do not have to let formatting irregularities or broken data-pulls derail your product metrics. For most modern setups, using =AGGREGATE(1, 6, range) is the quickest, most efficient way to skip errors and text. If you need highly tailored filtration, such as discarding zero-priced placeholders, leverage the power of FILTER and ISNUMBER.

Disclaimer:
The documents and templates provided on this page are for informational and illustrative purposes only. They do not constitute professional, legal, or financial advice, and should not be relied upon as such. Because individual circumstances and regulatory requirements vary, these materials may not be suitable for your specific needs. We recommend consulting with a qualified professional before adapting or using any of these examples for official or commercial purposes.