Excel Count not blanks cells of different format - excel

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.

Related

Compare lists with a function and no empty cells between

I want to compare 2 lists in excel. Each is on a seperate Worksheet. The output need to be a list like in Difference.
I can use Excel only without VBA. Someone an idea how to solve this :S
My problem is that i dont know how get Peter and Fabienne without the empty cell between.
Try FILTER() formula if you have Excel-365
C7=FILTER(A2:A4,D2:D4<>A2:A4)
D7=FILTER(B2:B4,E2:E4<>B2:B4)
You just need to add sheet reference to compare with Sheet2 like
=FILTER(A2:A4,Sheet2!D2:D4<>A2:A4)

Excel COUNTIF with multiple criteria and both row and column

I'm trying to make a COUNTIF that checks range E8:AI8 for the letter "D" and the range E7:AI7 for any of the following numbers 2;4;8;9;15;20;26;27;33;34;40;41
Also cells in range E5:AI5 to not equal any cell in C105:C118
E5:AI5 is dates in a calender.
C105:C118 is a list of dates for holidays.
My formular so far is looking like this:
Sumproduct(countifs($E$8:$AI$8;"*D*";$E$7:$AI$7;
{2;4;8;9;15;20;26;27;33;34;40;41};$E$5:$AI$5;"<>"&$C$105:$C$118))
However its not really turning out like i want it, the first two parts of the fomula are working as intended, but the last part comparing the row to the list of dates is not. Is it even possible to compare a row to a column? Or is there another way to do this?
That is not something you can do really inside a COUNTIFS() as described here. Consider to use SUMPRODUCT() with some MATCH() nested inside:
=SUMPRODUCT((E8:AI8="D")*(ISNUMBER(MATCH(E7:AI7,{2,4,8,9,15,20,26,27,33,34,40,41},0)))*(ISNA(MATCH(E5:AI5,C105:C118,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"))

Trying to put together a packaging list from a spreadsheet in excel

Excel Example 1
In column A I have a list of order numbers. In columns B-F I have the different products and the number of orders each have placed for the product. How do I make it so that when I type in the order value into I1, it will return all cells with values into the cells below?
I believe it is an array that i need but not positive. This is just an example, I am trying to do this on a larger scale.
Try to use this formula, it should help or at least give you an idea.
=INDEX($B$2:$F$6,MATCH($I$1,$A$2:$A$6,0),MATCH($I2,$B$1:$F$1,0))
OK, it will be like this:
In I2 your formula is
=INDEX($A$1:$F$1,1,MATCH(TRUE,ISNUMBER(INDIRECT("A"&MATCH(I1,A:A,0)&":F"&MATCH(I1,A:A,0))),0))
In I3 your formula is
=INDEX($A$1:$F$1,1,MATCH(TRUE,ISNUMBER(INDIRECT("A"&MATCH(I1,A:A,0)&":F"&MATCH(I1,A:A,0)))*(A1:F1<>I2),0))
In I4 your formula should be
=INDEX($A$1:$F$1,1,MATCH(TRUE,ISNUMBER(INDIRECT("A"&MATCH(I1,A:A,0)&":F"&MATCH(I1,A:A,0)))*(A1:F1<>I2)*(A1:F1<>I3),0))
And there it goes...
For each cell below you will need to repeat the multiplication "(A1:F1<>Ix)" with every cell above, because it evaluates an array which will compare to the others and return the next true result that isn't any of the colors above neither is a color without value.
Every of those formulas are array formula (confirm them with ctrl+shift+enter). You probably know how to get the values in J, but just in case, it's:
=INDEX($A$1:$F$7,MATCH($I$1,A:A,0),MATCH($I2,$A$1:$F$1,0))
PS: my Excel is in portuguese so my arguments separator is ";", I did change them for "," here in this comment. Just in case the formula doesn't work for you, try to look for some ";" I may have missed, also pay some attention to the $$ because I didn't lock the I1 reference properly, still I hope this can help you.
Thanks everyone for your answers. I ended up going with a vlookup then set a quick macro to run auto-filtering based off conditional formatting. It was the cleanest way i could find to work with the large amount of data I had.

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