How to SUMPRODUCT cells that contain formulas - excel

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)

Related

Find the average but without using range

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)

Excel Count not blanks cells of different format

I have some excel columns with different format.
Some are blanks and returns me "1" has a result. How possible?
I have been trying to have a standardize formula. Which dint work out.
=COUNTIF(BG:BG,"<>")
=COUNT(BF2:BF)
=COUNT(BF:BF)
=COUNTA(BF:BF)
Whats the proper formula to count all NOT BLANKS cells in a column?
What about using the IsBlank() function? Something like (not tested):
=SUM(If(IsBlank(BF:BF);0;1))
What is the data? I would assume you have some cells with spaces in them. If you are counting cells with numbers you could try;
=Countif(BF:BF,">"&1)
If they have words in them, try doing a trim function making a new reference column? =trim(BF2) and drop the formula down. Sorry its the best I can think of.

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"))

Excel Formula To Count The Number Of Times a Text Appeared in a Cell

I am looking for an Excel formula using IF function to Count the Number of Times a specific text appeared in a range of cells.
I do not want the COUNTIF formula. I want the formula to be built using IF function.
Any suggestion guys!! I would be really grateful.
Check how many times "f" appears in cell F7:
=LEN(F7)-LEN(SUBSTITUTE(F7,"f",""))
Or something like this if you really must use IF statement:
This will show you the number of "AA" occurrences in a range B2:G2 - look at the picture
{=SUM(IF(B2:G2="AA",1,0))}
Please remember that this is an array formula, so to execute it you'll need to use Ctrl+Shift+Enter
excel example

excel formula for SUM() where range is based on another cell?

I'm doing a sheet with this
=SUM(A2:A10)
And would like to have the range be dependent on the value in cell D5.
How can I do this? I looked into CHOOSE function, but that can only handle an array of 256 values. my actual range is several hundred thousand.
I tried this, but excel complained that this won't work:
=SUM(A(Sheet1!D5):A10)
To reiterate, in my formula, I want the 2 in A2 be dependent on the number I enter in cell D5
Use the INDIRECT() Function:
=SUM(INDIRECT("A" & Sheet1!D5 & ":A10"))
I'm posting my own answer because similar posts go into VBS, and other really complex things.
I solved this with INDIRECT:
=SUM(INDIRECT("A"&D5&":A10"))
Easy-peasy!

Resources