Find the average but without using range - excel

Just want to ask if there is an easy way for me to find the average but not using range since the values are placed in different cells?
Here the cells and the formula that I'm using to get the average (J28+O28+T28+Y28+AD28+AI28+AN28+AS28+AX28)/9
It is working, yes. But the problem is that there is a cell that the value may be empty. For example, all of it has a value except for AS28 & AX28, so the denominator should be 6 and not 9.
Is there a way for me to easily do this? Thanks!

Just use
=AVERAGE(J28,O28,T28,Y28,AD28,AI28,AN28,AS28,AX28)
It will happily ignore empty and non-numeric cells
Note: your cells list included 9 cells, so that sould be /9 right?

Use COUNTA() function to exclude empty cells. Try below formula-
=(J28+O28+T28+Y28+AD28+AI28+AN28+AS28+AX28)/COUNTA(J28,O28,T28,Y28,AD28,AI28,AN28,AS28,AX28)

Related

How to obtain minimum into the range when values >0?

I'm using this MINIFS formula on google sheet without problem
=MINIFS(D$2:D$1000;B$2:B$1000;J11)
but I need to obtain the minimum value into the range d$2:d$1000 excluding values <=0
so I tried different formulas like this
=MIN(IF(B$2:B$1000=J11,IF(D$2:D$1000>0,D$2:D$1000)))
that give me error :(
Just add a criteria to the MINIFS:
=MINIFS(D$2:D$1000;B$2:B$1000;J11;D$2:D$1000;">0")

Count cells bigger than 0, IF empty skip cell

I'm having a problem writing my formula that should count all selected cells that contain a number bigger than 0 and skip the cells that are completely empty, even when the cell is selected. Excel gives me an error that I selected cells that not contain a number. How can I skip them?
This is my formula:
=COUNTIFS(C8:C12;E8:E12;G8:G12;I8:I12;K8:K12;">0")
I'm thinking you using the COUNTIFS() formula wrong, after each range, there is a criteria. You can't have multiple ranges like that to look through. For more information look here or here.
In your case you are dealing with a non continues range, and one way to deal with that would be this
So the formula would translate to:
=SUM(COUNTIF(INDIRECT({"C8:C12","E8:E12","G8:G12","I8:I12","K8:K12"}),">0"))
Another formula you could try is:
=INDEX(FREQUENCY((C8:C12,E8:E12,G8:G12,I8:I12,K8:K12),0),2)
And looking at your data, it seems as though the rest of the columns contain text (not sure, they may be dates). In case they are text values:
=SUMPRODUCT((ISNUMBER(C8:K12))*(C8:K12>0))
If they are actually dates (assuming from 2018), then you could try:
=SUMPRODUCT((YEAR(C8:K12)<2018)*(C8:K12>0))
I'm assuming this is what you looking for, instead of a VBA based solution due to the tags provided and your formula.
You could also do it in this particular case by skipping the columns that you don't want:
=SUMPRODUCT((C8:I12>0)*ISEVEN(COLUMN(C8:I12)-COLUMN(C8)))
what will be happen if you use the below formula? to you receive an error?
=COUNTIF(C8:C12,">0")+COUNTIF(E8:E12,">0")+COUNTIF(G8:G12,">0")+COUNTIF(I8:I12,">0")+COUNTIF(K8:K12,">0")
Try this
Requirement cannot be done in single formula,
combining 2 or more formula will help fixing the formula.
formula
=COUNTA(B2:B9,D2:D9) -- Count all the non blank cell's
=COUNTIF(B2:B9,"=0")+COUNTIF(D2:D9,"=0") -- Count all the cells will value as 0
Subtract both which will give the output you are looking for
Combined formula
=COUNTA(B2:B9,D2:D9)-(COUNTIF(B2:B9,"=0")+COUNTIF(D2:D9,"=0"))

SUMIF with several OR criteria

The blue cell summates to 1, but that is not correct and it should summate to more because of the row text match with B47 row. Any ideas what's wrong?
SUMIF is not supposed to work with more than one criteria (you can't check multiple criteria within one SUMIF as you tried in your formula).
This formula will calculate the right result for you: =SUM(B3:BI3*(IFERROR(MATCH(B2:BI3,B47:AL47,0)>0,0))), this is an array formula, so you need to press CTRL+SHIFT+ENTER after it.
MATCH(...): look for all students whether they are in the list with requirments (this is the part which works only as array formula)
IFERROR(...): converts #N/A errors to 0
If I am not wrong, you are trying to calculate the number of students for a particular project with skill1 and skill2.
You may also try using COUNTIFS() function. This works for multiple criteria.

how to count multiple columns using countifs

I am putting in a formula to count the number of times a quote is required Indicated by the letter Q in a given column, when I put the formula in for one column I get the correct answer, but when I want to do it for multiple columns I get zero, can anyone help please?
the formula is
=COUNTIFS(D10:D29,"=Q",G10:G29,"=Q")
Try either
=SUMPRODUCT((D10:D29="Q")+(G10:G29="Q"))
or
=SUMPRODUCT(((D10:D29="Q")+(G10:G29="Q")>0)+0)
the former will count 2 if you have Qs in both D10 and G10 - the latter only counts each row once at most, even if there are two "Q"s
countifs criteria are connected by a logical AND. so that formula is saying it must find your string in column D AND in column G. Apparently there are 0 instances of that. if you want the total number of cells with it then make it one range.
If the must be non-contiguous, use multiple countif formulas and add them
as a note, here I would change my formula back to countif, instead of countifs for backwards compatibility since I don't use the extra criteria.
EDIT: my second example was incorrect (See comments) so I removed it
Actually, what I've found is that there is a way better way instead of the sumproduct, which can result in a overly-long formula if you have 5 columns. Instead, I found that using the SUM+IF function as we use the SUMPRODUCT, will achieve the result faster and better.
=SUM(IF((E:I="ABC")*(B:B="DEF"); 1; 0))
This function returns the number of rows that contain both "ABC" and "DEF" in the defined columns.
Spread the word!

How to SUMPRODUCT cells that contain formulas

So, what I need is to show SUMPRODUCT of two cell ranges? Both of these cell ranges, that is, each cell contains formula in it. From this formulas I get some number in the cells. This is the way I'm doing it right now:
=SUMPRODUCT((S7:S1000)*(T7:T1000))
and because of formulas I get error A value used in the formula if of the wrong data type
How could I solve this problem? Is there some kind of way to read just number in the cell and not the formula?
Thanks
Replace the "*" with a comma (",").
I've had so much problems with this and in the end it was that instead of comma(",") I needed to use semicolon(";"). Maybe its up to Excel version, I'm using 2010?! So, solution was:
=SUMPRODUCT(S7:S1000;T7:T1000)

Resources