I have this sheet with data:
the search range (row 3) is filled until column AM and the count range (row 4 and lower) is only filled until column R (more columns will be filled in time)
I need to have a formula to use in my count if formula to find the last filled column.
So in this case the the search range for the countif formula has to be:
=countif(C3:R3;C4:R4)
but when column S is filled, the formula should automatically use column S instead of R. etc.
the formula is used to calculate an average of the scores/percentage for a certain skill (e.g. optellen+aftrekken, tafels, tijd). So just counting the arguments in row 4 or lower is not enough. It also has to count how many times the given skill is found in the applying range (Column C to R, C to S etc).
I have a combinated formula to have the complete first parameter for the countif formula:
="'invoer optie2 (2)'!C$3:"&(ADRES(3;AANTALARG('invoer optie2 (2)'!4:4)+1;2;1))
(the formula is in dutch).
the result is this:
'invoer optie2 (2)'!C$3:R$3
This is the part I need for my countif formula. I keep struggling on how to use this in the countif formula so it uses it a the search range.
How can I convert this "string" to the range in the countif formula?
Do not use ADDRESS and INDIRECT as they are Volatile.
Instead use INDEX:
=COUNTIFS('invoer optie2 (2)'!C$3:INDEX('invoer optie2 (2)'!$3:$3,MATCH(1E+99,'invoer optie2 (2)'!4:4)),"WhatYouWant")
Related
I have data like following:
If I want it to convert it into specific ranges like following:
How should I do it on excel?
As Foxfire And Burns And Burns has mentioned, it is best to use a PIVOT TABLES and then Group it by intervals of 50. Using Pivot Tables and then Group & Ungroup is pretty easy and highly suggested by all excel experts in this community.
However if you are looking to use a formula to create that range (RAFFLE TICKET) that's how its known, then you may try the formula mentioned below,
Formula used in cell A2
=(ROWS($A$2:A2)-1)*50&"-"&ROWS($A$2:A2)*50
And Fill Down!
For those using Excel 2021 & O365, may try this one as well
=SEQUENCE(11,,0,50)&"-"&SEQUENCE(11,,50,50)
Next to get the total counts you can use SUMPRODUCT FUNCTION, which creates an array of TRUE's & FALSE's & multiplies the same with the corresponding ranges accordingly, so the formula used in cell B2
=SUMPRODUCT(($E$2:$E$16>=--LEFT(A2,FIND("-",A2)-1))*($E$2:$E$16<=--RIGHT(A2,LEN(A2)-FIND("-",A2)))*$F$2:$F$16)
And Fill Down!
I suggest you to create the Dummy column (C column) which will contain the limits of your ranges. And then you will fill values into the D column thanks to this formula :
=C2 & "-" & C3
So the first value Total Count column can be filled with (in column E) :
=SUMIF(A$2:A$16;"<"& C3;B$2:B$16)-SUMIF(A$2:A$16;"<"&C2;B$2:B$16)
and then you can extend the formula through the other cells of the column.
This SUMIF() formula calculates values for range <50 minus values for range <0 (for Range 0-50). For Range 50-100, this formula will calculate the sum for range <100 minus sum for range <50, and so on..
The
Remark : Here the limits of the range are not considered for example if Valeur =50 the formula in Range column doen't count it. If you want to consider them in account, you can modify the values of the Dummy column to 0; 49.999999; or 50.000001 (left for you as an exercice :) ).
I would advise you to create a helper column, using a formula like =ROUNDDOWN(A1,0).
Once you have this (let's say in column "C"), you can sum your values using the basic =SUMIF() function, something like:
=SUMIF(C$1:C$8,3,B$1:B$8)
(This will sum the values of the cells from B1 to B8, in case the corresponding values in column "C" are equal to 3, which means that the values in column "A" are between 150 and 199.99....
Using only "vlookup" does not work because there are a bunch of malfunctioning minutes & total numbers of it. So as I know I should combine "vlookup" with "sum" or I am wrong? please support me on this query.
You can use Countif() to count with conditions and Sumif() to sum up numbers that fulfill a condition.
In cell K10 (count System No malfunctions)
=Countif(A:A,K9)
... in words: count the rows in column A whose text is equal to that in cell K9.
In K11 you can conditionally sum with this formula:
=Sumif(A:A,K9,C:C)
... in words: for all the rows in column A whose text is equal to that in cell K9, sum the values in column C.
Copy the two formulas from K10 and K11, paste them into K15 and K16 and change the reference from A:A to D:D to look at the code column instead of the system number.
I need a count if function that counts me the cells that meet a certain criteria. This should be done with countifs. The formula is the following:
=COUNTIFS(Orders!D:D;"*Ecolab*";Orders!B:B;">=01/01/2019";Orders!U:U;">=36";Orders!K:Q;">=1")This formula returns me an value type error.
This formula works well until I introduce the last condition orders!K:Q;">=1"
I would like a formula that counts if the word Ecolab is present in the cell; if the date is after or equal 01/01/2019; if the column U has more or equal than the number 36 and if there is at least a "1" in the cells in the row from column K to column Q. I could do this by easily replicating the countifs several times, (i.e =COUNTIFS(Orders!D:D;"*Ecolab*";Orders!B:B;">=01/01/2019";Orders!U:U;">=36";Orders!K:K;">=1")+COUNTIFS(Orders!D:D;"*Ecolab*";Orders!B:B;">=01/01/2019";Orders!U:U;">=36";Orders!L:L;">=1")+...........+COUNTIFS(Orders!D:D;"*Ecolab*";Orders!B:B;">=01/01/2019";Orders!U:U;">=36";Orders!Q:Q;">=1")
But I would rather not include such a long formula as it would create confusion for the ultimate user of the excel sheet
Per my comment above, you could use SUMPRODUCT (avoid using whole columns for that) or an array with OFFSET like this:
=SUM(COUNTIFS(Orders!D:D;"*Ecolab*";Orders!B:B;">=01/01/2019";Orders!U:U;">=36";OFFSET(Orders!J:J;0;{1;2;3;4;5;6;7});">=1"))
If the count for K:Q should be 1 when there may be more than one cell greater or equal to 1 in a single row then you need to apply OR criteria in a SUMPRODUCT.
SUMPRODUCT formulas should not use full column references; there is too much wasted calculation. The following is for rows 2:99; adjust for your own use.
=SUMPRODUCT(--ISNUMBER(SEARCH("ecolab", Orders!D2:D99)),
--(Orders!B2:B99>=DATE(2019, 1, 1)),
--(Orders!U2:U99>=36),
SIGN((Orders!K2:K99>=1)+(Orders!L2:L99>=1)+(Orders!M2:M99>=1)+(Orders!N2:N99>=1)+(Orders!O2:O99>=1)+(Orders!P2:P99>=1)+(Orders!Q2:Q99>=1)))
I need to sum values in column A that meet certain criteria in column B until the next blank cell. The image (link above) shows the result I need: sums of all "A" for each three of the batches. I'm using this formula to calculate a total sum for each batch, and it works fine:
IF(A3="";SUM(A$1:A2)-SUM(C$1:C1);"")
But when I try to add SUMIF condition to this formula it doesn't work:
=IF(A3="";SUMIF(B:B;"A";A$1:A2)-SUM(D$1:D1);"")
What am I doing wrong?
Sum if requires that the range sizes be the same.
Put this in C2 and copy down:
=IF(B3="",SUMIF($B$2:$B2,"A",$A$2:$A2)-SUM($C$1:C1),"")
If the value in B in the next row is a null string then it will do the SUMIF, if not it returns a null string.
The SUMIF is being done on all the values from row 2 to the row in which the formula is being placed. We are then subtracting the already counted values above where the formula is placed in column C to get the new sum.
I want to have a sum formula in a cell such as =SUM(Ex:Ey) while E is the column and x and y are row numbers. Is there a way I can have excel to match x and y to the numbers in other cells? For example: cell D1=3 and D2=12 and there are many numbers in column E. By the end of column E, I want to have a cell that sum only the rows from the numbers of D1 to D2, which is sum of E3 to E12 in this example. The idea is that I can change D1 and D2 to change what rows in column I want to sum.
You can use INDIRECT to reference a range using a constructed string address - SUM(INDIRECT("E"&D1&":E"&D2)).
"E"&D1&":E"&D2 will give you the string "E3:E12" in your example, which INDIRECT will then convert to a reference to that actual range.
Note that INDIRECT comes with a recalculation overhead, but will be fine if you aren't doing too many of them or too complex things!
Another way to achieve this is to use the sumif formula or sumifs for multiple conditions. This works better in some situations and can be easier to read and audit\review.