Array formula to ouput project names - arrays

I am trying to use an array formula to look at column R and if column R says concepting- it will give me the list of project names in columns A that are currently in concepting.
The formula I am using is:
=IFERROR(INDEX('ACTIVE PROJECTS'!$A$1:$A$350,SMALL(IF(('ACTIVE PROJECTS'!$R$1:$R$350="CONCEPTING")),ROW('ACTIVE PROJECTS'!R$1:$R$350))ROW(2:2))),"")
It keeps telling me my formula has an error.
Can anyone help with the formula?

You were pretty close. A misplaced bracket and a missing comma was all that was fouling up the works.
=IFERROR(INDEX('ACTIVE PROJECTS'!$A$1:$A$350,SMALL(IF('ACTIVE PROJECTS'!$R$1:$R$350="CONCEPTING", ROW($1:$350)), ROW(1:1))),"")
I tightened up the formula by using ROW($1:$350) in place of ROW('ACTIVE PROJECTS'!R$1:$R$350). The ROW function doesn't actually care where the row number comes from.
Now, that is not a unique list; just a list of those projects that have a CONCEPTING value in column R. I suppose the nature of the data could make that list unique but the formula does not. A unique list is slightly more involved.

Related

How can I write an array formula that extracts unique values from a list only if they have a certain value in the column next to them?

I have an understanding of how index/match can be used to create a unique list of items. I'm trying to create a unique list of items in a specific category and that is presenting a challenge to me.
For instance, say I have:
INDEX SPY
INDEX SPX
GOLD GLD
GOLD JNUG
GOLD GLD
INDEX SPY
and I want to extract only the unique GOLD values from the list. The output should be: GLD, JNUG.
I wrote a separate array formula to check if the left column is GOLD then output the symbol from the right column but the problem I'm having is that whatever I set for false ends up looking like it's part of the list to the index/match formula.
I was thinking that maybe there's a way to remove all zero-value array elements before exposing it to index/match but I'm out of my league here. Any suggestions on how to get the job done efficiently would be appreciated. Thank you!
Let's assume your data is in A1:B6. With UNIQUE and FILTER this is pretty easy now (Excel 2021+). Use the following in one cell, and it will spill:
=UNIQUE(FILTER($B$1:$B$6,$A$1:$A$6="GOLD"))
In earlier versions, it's a bit more work. You can use the following array formula (Ctrl+Shift+Enter to enter). Here entered into cell D3:
=IFERROR(INDEX($B$1:$B$6,MATCH(0,IF("GOLD"=$A$1:$A$6,COUNTIF($D$2:D2,$B$1:$B$6),""),0)),"")
You drag this formula down until you reach empty cells (the IFERROR() wrapper converts the #N/As that appear after all unique values have been found into ""). The "magic" is here done by IF("GOLD"=$A$1:$A$6,COUNTIF($D$2:D2,$B$1:$B$6), supplying INDEX() with new rows only for those rows that contain "GOLD" in $A$1:$A$6.

Is there a way to search for multiple strings within a range of cells, and return the range sorted by the first column?

I'm looking for a way to search within the cells in a range for a specific text value, and have them returned sorted by those values along with the corresponding cell in the next column over. For example, in column A I have the description of the item, and in Column B there is a number value:
Unsorted
These describe that particular formats (Col A) and how many of each (Col B). So what I'm looking to do is sort by multiple format, "K-7.75" and "K-20L" for example, and then return that cell along with the corresponding Column B. Is there a way I can write this all in one formula, searching for multiple strings within Col A? Here's what I'd like the output to look like, with the formulas being in A1, A9, and A13:
Sorted
I know there is a filter option, but I cant seem to use multiple strings in that and I'm looking to eliminate steps in reordering this info. I feel like there's a way to do this with Array and Search or Sort or something, but I'm stuck. Thank you in advance for any help.
Solved thanks to Kessy:
Do you know in advance the conditions you will get like "k-7.75"? If that is the case you can set every x rows or every x columns the following filter function: =FILTER(A:B, REGEXMATCH(A:A,"K-7.75")) – Kessy
=FILTER(A:B, REGEXMATCH(A:A,"K-5.16|1/6|K-20|20L|K-7.75|1/4|K-30|30L")). Using the operator character "|" as an OR logic. Thank you for putting me on the right track! – MisterSixer

Excel Array formulas details and guidance needed (INDEX,MATCH and SUM/COUNTIF)

So I'm having difficulties understanding fully how arrays works and when they are used by excel and specifically what happens in the background.
From reading the past few hours I understand that one of the reasons my Index Match doesn't work without array is simply because its a multicriteria Match that I use as below:
{=INDEX(D30:E36,MATCH(F33&G33,B30:B36&C30:C36),2)}
From what I understand the reason is that Match returns a {x,y} result which classifies it as an array formula. But considering the point is to get a row number, if the row I'm looking for is 5 then Match will return a {5,5} for row number for Index. And then Index interprets this as just 5? or what exactly happens in the background here?
Then I found an article which showed how to circumvent the array formula and not need ctrl+shift+enter as shown below. How does the below change things and what happens in the background?
=INDEX(D30:E36,MATCH(F33&G33,INDEX(B30:B36&C30:C36)),2)
The below is a an array SUM/COUNTIF formula which counts unique cells only which does not work without array brackets. Why is that and how does it work? It involves maths so I'm not sure.
{=SUM(1/(COUNTIF(A1:A5,A1:A5)))}
Thank you!

SUM with IF conditions for cells containing both strings and numbers

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.

How to arrange table data differently by using if, match, and index?

As shown in the attached image, I need to convert A2:D10 to the format of A12:E17. The 4 tables from F1 to AB12 are my experiments using if, match, and index. Same formula gets different results and it seems to be dependent on the row position of the tables. In My previous question, I was trying to pinpoint the problem to the if function.
What am I doing wrong here?
Thanks,
Lu
enter image description here
Again, as I said in your last question: The formula has not been array entered. Array formulas need to be confirmed with Ctrl-Shift-Enter.
Without that, the first array in the IF statement does not get resolved and the Match does not return the correct result.
Make use of the Evaluate Formula tool and step through the formula.
The merged cells don't help with the cell referencing. Unmerge the cells and fill in all the labels in row 1, then use this slightly amended formula and confirm it with Ctrl-Shift-Enter. Then copy across and down.
I hope that I get the English names of the functions right:
In D14 and following cells:
=INDEX($C$1:$C$5;MATCH(1;MMULT(($B$3:$B$10=$A14)*($A$3:$A$10=B$13);1);0))
The MATCH function tells which value (by number counted from the top) matches both conditions. The INDEX function returns this value from C1:C5.

Resources