Home > Blockchain >  How to use AVERAGEIFS() and <> in google sheets
How to use AVERAGEIFS() and <> in google sheets

Time:07-27

I have an omit column in my spreadsheet so I can - obviously - omit that row from calculations. I mark rows to omit with 1. I would assume this would work: =AVERAGEIFS(C2:C4,B2:B4,"7/26/2022",A2:A4,<>1). Based on searches I've also tried "<>1", <>&"1" and a number of other combinations. Most solutions show how to use it with AVERAGEIF() and not AVERAGEIFS(), which has a different structure.

Here is a screenshot to clarify. Expected output would be "4". Thanks AVERAGEIFS() example data

CodePudding user response:

This formula worked for me:

=AVERAGEIFS(C2:C4,B2:B4,"7/26/2022",A2:A4,"")

enter image description here

Instead of getting the values that are not 1, I instead am asking for all the blank cells. This also means that you can use any character in the omit column and it will ignore it.

CodePudding user response:

I was creating the little setup also, but Kaitlynmm569 beat me to it. I agree with Kaitlynmm569, though you might want to consider replacing the fixed date criterion with the contents of a cell.
That way you don't have to keep changing the formula, but only the 'input cell' instead when you want to:

Dynamic date input with a fixed formula

=AVERAGEIFS(C2:C4,B2:B4,$F$2,A2:A4,"")    
  • Related