Excel 2013 | List content of non-blank cells in array - excel

In Excel 2013 I need to have the content of the cells on the array A9:E18 listed in the cells from H1 to H10 (because I already know that there will always be exactly 10 non-blank cells in that array, the rest of them being empty).
I cannot find a proper formula to have it done.
Could anybody help me, please?

I would suggest you to use FILTERXML() with TEXTJOIN() function. Unfortunately Excel2013 doesn't have TEXTJOIN() function. You can use a custom TEXTJOIN() function from this article TextJoin UDF For Excel 2013
of #Scott Craner answer. Then use FILTERXML() like below.
=IFERROR(INDEX(FILTERXML("<t><s>"&TEXTJOIN("</s><s>",TRUE,$A$1:$E$18)&"</s></t>","//s"),ROW($A1)),"")
With Excel365 you can simply use-
=FILTERXML("<t><s>"&TEXTJOIN("</s><s>",TRUE,$A$1:$E$18)&"</s></t>","//s")

Related

How to use TEXTJOIN to combine all negative values

How to text join all negative value references?
Using textjoin function or any other function in Excel. (without VBA code)
You can use formula suggested by JvdV. You can also try TEXTJOIN() with FILTER() formula.
=TEXTJOIN("|",TRUE,FILTER(A2:A7,C2:C7<0))
So, had a quick play and this works:
Only did the first 3 but if() and iferror() or isblank() come to mind if there is only one, two etc results to avoid repeating | without names...
Note, the formula shown in C1 should be SMALL(... not LARGE(...

What is the equivalent of Split function in excel?

I have a dynamic formula in google sheet that splits a rept string into multiple columns using this formula: =split(rept(A1,B1)," ").
But I can't seem to figure out how to do this in excel. Any suggestion would be helpful.
https://docs.google.com/spreadsheets/d/1IcIvhuwA3z2lngz-l4TwuenPgCMOGdCwe_Ukhu_f5zQ/edit?usp=sharing
If you have SEQUENCE() function access then try-
=TRANSPOSE(INDEX(A1,SEQUENCE(B1,,,0)))
You could use FILTERXML() to mimic a split funcitonality:
Formula in A3:
=TRANSPOSE(FILTERXML("<t><s>"&REPT(A1&"</s><s>",B1)&"</s></t>","//s[.!='']"))
The above will spill the returned array horizontally using Microsoft365. If you don't have acces to dynamic array funtionality, you could use indices to return values from the resulting array.
For further explainations and examples using FILTERXML() I'd like to refer you to this Q&A on the topic.

Search and combine multiple values from an array

There is a data set with cells containing multiple values.
I need to cross check each cell in the dataset with a predetermined list of values and return all matching values in one cell per row.
The best option would be to use TEXTJOIN function but it doesn't work in my Excel 2016. Here is the alternative code I tried to make but it returns only the first value in the array.
{=IF(SUMPRODUCT(--ISNUMBER(SEARCH(list,A2))), IF(ISNUMBER(SEARCH(list,A2)), list, ""), "")}
Will greatly appreciate any help!
The same has been answered through comments by Scott Craner, hence the same is in unanswered history. Behalf of Scott posting answer here which have accepted by question owner.
Your TEXTJOIN Formula would be =TEXTJOIN(", ",TRUE,IF(ISNUMBER(SEARCH(list,A2)),list,"")) entered as an array formula with Ctrl+Shift+Enter. Put the code from the first link in a module attached to the workbook and use the formula

Vlookup Formula Issue

Hi Everyone, Please have a look on Cell D2. I have tried the Formula
=VLOOKUP(B2,$B$8:$D$12,3)
But it doesn't give the Result i.e. I require 04 Values as I have written there Manually but it's giving only 01 Value. I think an Array Formula might work but don't know.
VLOOKUP will not work as it will only return one answer.
You will want TEXTJOIN as an array formula
=TEXTJOIN(CHAR(10),TRUE,IF($B$8:$B$12 = B2,$D$8:$D$12,""))
Being an array formula it must be confirmed with Ctrl-Shift-Enter instead of Enter when exiting edit mode.
TEXTJOIN was introduced with Office 365 Excel.
If you do not have Office 365 Excel and still want the values in one cell like your example you will need vba.

Google Spreadsheet Version of COUNTIFS statement

I need to convert the formula below to a googledoc available formula. I've had trouble doing this with array formulas.
=COUNTIFS(Sheet1!J:J,"M",Sheet1!K:K,"Yes")
This?
=ARRAYFORMULA(COUNTIF(A2:A13,"m")+COUNTIF(B2:B13,"yes"))/2
Divide by the total columns you are searching...

Resources