AVERAGEIF column A equals 1

Hello, Can anyone point me to a page that specifies how to write criteria for avergeif.

Also, how do I say “AVERAGEIF column A equals 1”?

Hello

  • Link to help:

    AVERAGEIF

    There a some examples and especially a further link to regular expressions.

  • Column (!) equals 1 (assuming you want to calculate the average of values in Colum B if their respective column A value equals 1. Average of column A makes no sense if you only calculate average of values equal to 1, since the average will be, of course, 1): =AVERAGEIF(A:A,"1",B:B) or e.g. assuming rows 1 to 100; =AVERAGEIF(A1:A100,"1",B1:B100)

PS: I prefer to write =AVERAGEIF(A1:A100,"=1",B1:B100), because it makes more visible (to me) the nature of a condition in the function.

PPS: The delimiter “,” within the functions argument list may be different in your locale.

@your PS: [OT]
I’m partially agree … but I’m always distracted by this ""quotes around numeric values[1] and prefer a syntax like =SUMPRODUCT(A:A=1,B:B)

[1]every serious programming-language puts literal strings into quotes, and nothing around literal numeric-values.

That’s true what you say about “serious programming-language” but, the second argument is a condition and from my perspective a condition has to be expressed in terms of a string. Your argument makes “1” an numeric and in fact there needs to be an internal programmatic conversion to the real meaning of “=1” (and I did not write ="1")

Click fx in the calculation bar.

image description

It opens the dialog box “Function Wizard”.

Select the function AVERAGEIF and doubleclick on it.
You can now enter your relevant values directly.

If my answer did solve your problem, please click the big checkmark inside the circle to the left of this answer.
It then indicates to the other participants that the question has been answered correctly.

With me Windows 10 Home; Version 1809; 64-Bit | LibreOffice, Version: 6.2.3.2 (x64).

See also the Help for AVERAGEIF which has a number of examples.