Quantcast
Channel: Hot Weekly Questions - Web Applications Stack Exchange
Viewing all articles
Browse latest Browse all 9782

How to use an arrayformula with dynamic row numbers (and other nested functions)? [closed]

$
0
0

I have 9 columns, each with the header 1-9. I want to iterate across each row, and if value exists in a particular column, I would like to grab the header value (1-9) and concatenate it as a comma separated array.

Then, I would like to be able to use an arrayformula to display each of these arrays vertically—one per row—without having to copy paste my formula to each row.

Here's what I have so far:
=ArrayFormula(IF($C$2:$C>0,IFERROR(JOIN(",",(FILTER(INDIRECT("N"&ROW()):INDIRECT("V"&ROW()),INDIRECT("N"&ROW()):INDIRECT("V"&ROW())<>""))),""),""))

The formula works perfectly if I paste it into every row (without arrayformula). However, if I use arrayformula it only outputs the value of the first row (but only to the rows that have values—it remains empty if there are no values).


Viewing all articles
Browse latest Browse all 9782

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>