I'm looking to use an array formula to makes lists of students who have entered different events, but also need to split by gender.
I have the first array working where it lists the students in each event but can't seem to get the second condition to work properly.
Here is my working formula for the first event lists:
=IFERROR(INDEX($A$3:$A$502,SMALL(IF($C$3:$C$502=1,ROW($C$3:$C$502)-ROW($C$3)+1),ROWS($C$3:$C3))),"")
Here is my non-working attempt at the second one:
=IFERROR(INDEX($A$3:$A$502,SMALL(IF(AND($C$3:$C$15=1,$B$3:$B$15="F"),ROW($C$3:$C$15)-ROW($C$3)+1),ROWS($C$3:$C3))),"")
What am I doing wrong?
Try,
=IFERROR(INDEX($A:$A, aggregate(15, 6, row($3:$502)/(($C$3:$C$502=1)*($B$3:$B$502="F")), row(1:1))), text(,))
I have no idea why your sample formula had the criteria ranges going down to row 15; the ranges need to be the same.
Array formula do not like AND or OR use * and + respectively.
=IFERROR(INDEX($A:$A,SMALL(IF(($C$3:$C$15=1)*($B$3:$B$15="F")),ROW($C$3:$C$15)),ROW($A1))),"")
Related
I am well aware that FILTER doesn't work with Array Formula. On all of the posts I've seen, people are substituting it by Array Formula + Vlookup. My problem is that I use FILTER on more than one condition.
Example: FILTER(Deliveries!A:A, Deliveries!C:C=A2,Deliveries!B:B=B2)) (This is in a different sheet, where I use filters in both Columns B and C).
This sheet is the repository of a form, and when the form adds rows the formulas do not get copied down to the added rows, hence my effort to turn this into an Array Formula or maybe a query. I'd be equally satisfied with another solution (i.e. something that forced formulas to always follow the addition of new rows).
Thank you very much for your time!
try in row 1:
={"header"; ARRAYFORMULA(IFNA(VLOOKUP(A2:A&B2:B,
{Deliveries!C:C&Deliveries!B:B, Deliveries!A:A}, 2, 0)))}
I've got a bigger table with one column that I want to focus on, containing designation and a number. I want to simply sum the numbers that meet the criteria based on a designation.
For the simplification, I made an exercising sheet (on the pic) where I split second column into two - one string and one numeric. Since my file is quite large with many columns that would need this it would be inconvenient.
In the left column it's easy to solve the problem, it could be even easier with simple SUMIF function, but an array SUM(IF... function is, at least I think, only viable option here.
So I solved the first table with array function, but what confuses me is how to modulate the TRUE statement. Simple replacement of C:C
with
VALUE(MID(F:F;4;4))
which would format my cells to get the numbers from string does not work that way - returns zero in E12 field. F12 is just application of string to number for last cell, F10.
THIS formula does not work, even adapting to different versions of the tool.
I could use VB but if possible anyhow I would like to avoid it since parts will be shared on mobile phones.
Any ideas? Thanks a lot!
Left table was split, right original format
The array formula which you used can be replaced by the SumIf formula like below...
=SUMIF(B:B,"B",C:C)
Also without the helper column, you can use the Sumproduct formula to achieve the desired output.
But don't refer the whole column in the formula like in the above SumIf formula.
Try this..
=SUMPRODUCT((B1:B10="B")*MID(F1:F10,FIND(",",F1:F10)+1,255)*1)
Change the ranges as per your requirement but remember to make them equal in size.
I am trying to find the SUM of a multipart IF statement using a separate spreadsheet:
=SUM(IF(AND([Doc.xlsx]Sheet1!$B$7:$B$348="APPL*", C15=[Doc.xlsx]Sheet1!$C$4:$BG$4),[Doc.xlsx]Sheet1!$I$7:$J$348))
NOTE: C15 = "A1"
I've tried breaking this formula down into these two separate parts:
=IF(C15=[Doc.xlsx]Sheet1!$A$4:$BG$4,TRUE)
and
=IF([Doc.xlsx]Sheet1!$B$7:$B$348 = "APPL*",TRUE)
However, these all fail out.
How can you find a single output using two criteria such as a column head and a row header?
Here is an image of what I'm working with. I need to sum all of the numbers met by the criteria from the grid by using the Column header and Row header.
As per my comments one must have uniform output to input ranges; same number of rows as the row headers and same number of columns as the column headers.
This will then find where the two intersect and sum the corresponding intersections.
With Array formula on cannot use AND() or OR() functions. Use * or + respectively to accomplish the same thing.
So something like:
=SUM(IF((A2:A12=B15)*(B1:K1=B16),B2:K12))
Being an array formula it needs to be confirmed with Ctrl-Shift-Enter instead of Enter when exiting edit mode. If done correctly then Excel will put {} around the formula.
But one can do the same with SUMPRODUCT() without the need for Ctrl-Shift-Enter.
=SUMPRODUCT((A2:A12=B15)*(B1:K1=B16),B2:K12)
SUMPRODUCT does not need the Ctrl-Shift-Enter to enter but the normal entry method. It is still an array type formula.
Now to the second part IF/SUMPRODUCT do not use wild cards so you will need to use SEARCH() which will allow the use of wildcards.
=SUM(IF((ISNUMBER(SEARCH("APPL*",[Doc.xlsx]Sheet1!$B$7:$B$348)))*(C15=[Doc.xlsx]Sheet1!$C$4:$BG$4),[Doc.xlsx]Sheet1!$C$7:$BG$348))
The SUMPRODUCT:
=SUMPRODUCT((ISNUMBER(SEARCH("APPL*",[Doc.xlsx]Sheet1!$B$7:$B$348)))*(C15=[Doc.xlsx]Sheet1!$C$4:$BG$4),[Doc.xlsx]Sheet1!$C$7:$BG$348)
I have an array formula that looks like this:
{=SUMIF(C11:C23,budgets,F11:F23)}
What I want it to do is sum cells F11:F23 where cells C11:C23 are values within the named range budgets.
Right now budgets has two values: 10361 and 10300 (these are transaction codes). However, the formula seems to only work for the first code 10361 but not for the second one.
I don't want to use SUMIFS because I have multiple worksheets where I would like this array formula to work, and the codes may change so changing them in one place (the named range budgets) will make things easier.
Any ideas? I don't know VBA, so was hoping for a formula solution.
Use SUMPRODUCT with COUNTIF():
=SUMPRODUCT((COUNTIF(budgets,$C$11:$C$23)>0)*$F$11:$F$23)
Or you can use this array formula:
=SUM(SUMIF(C11:C23,budgets,F11:F23))
Being an array it needs to be entered with Ctrl-Shift-Enter when exiting edit mode instead of Enter. If done properly Excel will put {} around the formula.
I have a cell that currently uses an array formula to return the name associated with the minimum hours worked for all my employees. However, what I am trying to do now is write an array formula that lists the three next employees with lowest hours. I have written a formula similar to this in the past, but can't seem to get the two formulas to appropriately match up.
My current return minimum employee formula in G5:
={INDEX(A:A,MATCH(MIN(IF(B:B=G3,IF(C:C>=$G$2,D:D)))&G3,D:D&B:B,0))}
Here is an example of my data:
...and now I'm attempting to incorporate in into the following array formula that would return a list of qualifying results as I dragged it down a column:
={(IF(ROWS(G$7:G7)<=F$8,INDEX($A$2:$A$8,SMALL(IF(Employees!$B$2:$B$8=$G$3,ROW($A$2:$A$8)-ROW($A$2)+1),ROWS(G$7:G7))),""))}
Currently, this array formula is only set up to match on position title and not the other qualifiers that I need from my minimum employee formula. How can I mesh the two formulas correctly? Thank you for any and all help and please, let me know if you need any clarification.
The ideal array result would show Boris and two blanks in consecutive rows in the Next 3 Employees chart.
Set your page up like this:
With the ranking in column F.
Then it is a quick modification of the last formula. Instead of MIN we use Small. The k part of the small equation is the ranking number:
=INDEX(A:A,MATCH(SMALL(IF(B:B=$G$3,IF(C:C>=$G$2,D:D)),F5)&$G$3,D:D&B:B,0))
This goes in G5. Is confirmed with ctrl-shift-enter. Then copied down for rows.
If do not want the errors to show then wrap it in IFERROR:
=IFERROR(INDEX(A:A,MATCH(SMALL(IF(B:B=$G$3,IF(C:C>=$G$2,D:D)),F5)&$G$3,D:D&B:B,0)),"NO MATCHES")