Average cells in a column and ignore those with 0 and #VALUE, but only if I different column contains a certain year.
Our take
When a user asks how to average a column while sidestepping zeros, errors, and a conditional year filter, the question is more than a formula‑hunt; it is a glimpse into the friction that still exists between legacy spreadsheet habits and the promise of AI‑native data tools. The Reddit post from /u/Wicked‑Storm illustrates a classic pain point: the need to blend multiple logical tests—non‑zero values, error‑free cells, and a year‑specific qualifier—into a single, tidy expression. Readers who have wrestled with similar scenarios will recognize the underlying desire for a workflow that “just works” without a cascade of nested functions. The same challenge is addressed in our own coverage of “Average cells ignoring both 0s and #VALUE!” and the companion piece “AVERAGEIFS w multiple criteria in the same row, nonzeros.” Both articles show that while Excel’s AVERAGEIFS can handle multiple criteria, the syntax can become unwieldy, especially when the year filter is expressed as a wildcard string like “*2026*.” The real obstacle is not the lack of function; it is the disconnect between a user’s mental model of “filter by year” and the spreadsheet’s literal text‑matching logic.
The solution, in a traditional spreadsheet, typically involves wrapping the target range in an IF that screens out zeros and errors, then nesting that inside an AVERAGEIFS that references the year column. A compact, yet readable construction looks like this:
``` =AVERAGEIFS(AW2:AW100, AL2:AL100, "*2026*", AW2:AW100, "<>0", AW2:AW100, "<>#VALUE!") ```
The key is to repeat the AW range for each non‑numeric condition, because AVERAGEIFS evaluates each criterion independently. If the year column contains actual dates rather than plain text, the wildcard approach fails; converting the column to a year number with YEAR(AL2:AL100) or using a helper column that extracts the year resolves the mismatch. For those who prefer a single‑array formula, the modern dynamic‑array environment offers a cleaner alternative:
``` =AVERAGE(FILTER(AW2:AW100, (AL2:AL100=2026)*(AW2:AW100<>0)*(ISNUMBER(AW2:AW100)))) ```
This expression leverages FILTER to keep only rows that meet all three conditions, then averages the resulting array. The multiplication operator acts as a logical AND, and ISNUMBER automatically discards #VALUE! errors. The result is a formula that reads like a sentence, aligns with the human‑centered design we champion, and eliminates the brittle wildcard matching that trips many users.
Why does this matter beyond the immediate spreadsheet? In a data‑driven workplace, the time spent coaxing a formula to ignore noise directly erodes productivity. Each extra step—creating a helper column, nesting IFs, or debugging a wildcard—adds cognitive load and creates opportunities for errors to slip through. By adopting array‑centric patterns, users not only simplify their sheets but also lay the groundwork for seamless migration to AI‑enhanced platforms that can interpret intent without explicit syntax. Imagine a future where you simply type, “average the non‑zero, numeric values in column AW for rows where the year is 2026,” and the engine translates that into the optimal, error‑resilient calculation. The current work‑around is a bridge toward that vision, demonstrating how a deeper understanding of native functions can unlock a smoother transition to more intuitive data experiences.
Looking ahead, the next wave of spreadsheet innovation will likely blur the line between formula and natural language, allowing conditional aggregates to be expressed with conversational prompts. As AI continues to embed itself in spreadsheet cores, the question becomes: how soon will we no longer need to remember the quirks of wildcards, helper columns, or even the distinction between text and date formats? The answer will shape how quickly users can move from manual tinkering to truly exploratory data analysis, turning every cell into a launchpad for insight rather than a source of frustration.
Back again because everyone was so helpful!
I'm trying to Average cells in row AW, while ignoring Os and errors, while also only doing that row if column AL contains a certain year. I think that makes sense?
I know it needs to be an AVERAGEIF formula, but when I do "*2026*" as the Criteria, before even attempting the >0, the formula breaks.
[link] [comments]
Read on the original site
Open the publisher's page for the full experience
Related Articles
- Average cells ignoring both 0s and #VALUE!I am trying to create a formula to ignore both 0s and #VALUE!. My G4-G15 column has 0-10 and a #VALUE!. I have tried the below and any help is appreciated. =AGGREGATE (1,6,(G4:G15*(G4:G15<>0))) =AGGREGATE (1,6,(G4:G15/(G4:G15<>0))) =IFERROR(AVERAGE(G4:G15<>0),G4:G15) =IFERROR(AVERAGE(G4:G15<>0),"") =AGGREGATE (1,7,(G4:G15*(G4:G15<>0))) =AGGREGATE (1,7,(G4:G15/(G4:G15<>0))) submitted by /u/Wicked-Storm [link] [comments]
- AVERAGEIFS w multiple criteria in the same row, nonzeroshttps://preview.redd.it/2rv31ly50hpg1.png?width=1101&format=png&auto=webp&s=57995ed19b856c2b5a36b92e7a39fd2737fd7744 Hi all, I am trying to create an average formula that looks at the header of each column (row 4) and selects based on that. Basically, is it's an "A" AND "F", I need it to average excluding any zeros. See above. Thanks for any help! submitted by /u/squatonmeplz [link] [comments]
- Simple Formula Spilling into an ArrayWhile trying to set up a simple IF statement with an AVERAGE function, I am getting results spilling out into an array over a number of cells below the formula. Specifically, I get a set of cells starting with the one with the formula and going down a coulumn to equal the number of cells I specified in the formula, surrou ded by a light blue border along the outside. An example of my formula is below: =IF(C14:C17<>"",AVERAGE(C14:C17),"") As this is being used as part of a form I am making, there are no values in any cell surrounding the formula except the cell to its left being a row label (just says "Average"). And AVERAGE function should also only provide one solution as well. I cannot figure out what Excel is trying to do or how to correct it. Does anyone have a similar issue with this happening? I am curious if this is a new example of an update breaking something in Excel it shouldn't have. Also, is there a solution I can try? I tried the "@" addition, but that didn't work as intended. Any help would be most helpful. submitted by /u/Charliefoxkit [link] [comments]
- AverageIF function returns with a #DIV/0! because the criteria does not exactly match.I am working with a set of values where there are repeated x values with multiple y values. For example, x value of 10 would have values like -0.5, -0.51, -0.52. I am trying to get the average of these y values for each x value in 0.01 increments. The averageif work functions works up until a certain point that it just returns with #DIV/0!. When I check the error, the criteria doesn't match the cell on its left. In the photo, the criteria shows as 16.51000....01 when the real criteria (on the left) is 16.51. Where is the error coming from? The way I typed up the x values in 0.01 increments is typing 0.0 and 0.01 and dragging that down to my target value. I tried the sequence function as well but I get a similar error. https://preview.redd.it/nqxm49h65bvg1.png?width=963&format=png&auto=webp&s=9ab15643dd08220a3d02b5a603acabf493a9fee3 submitted by /u/punksakura [link] [comments]