Forum Discussion
KanwalNo1
Jun 21, 2021Iron Contributor
Join the results of two filtered tables in a single range
Hi, I am using the following formula to join the filtered results of two tables. Filter is resulting in 2 rows from 1st table and 10 rows from 2nd table. While the results of 1st table are corr...
SergeiBaklan
Jun 21, 2021Diamond Contributor
assuming you have same number of columns, rest of the formula will be as
...
m, SEQUENCE(,COLUMNS(oddarray)),
IF(k <= oddK,
INDEX(oddarray, k, m),
INDEX(evenarray, k-oddK, m)
)
KanwalNo1
Jun 21, 2021Iron Contributor
SergeiBaklan It is working perfectly except when oddk = 0 and/or evenk = 0
- SergeiBaklanJun 21, 2021Diamond Contributor
You may modify as
oddK,IFERROR(ROWS(oddarray),0), m, IFERROR(SEQUENCE(,COLUMNS(oddarray)), SEQUENCE(,COLUMNS(oddarray))), IF((k <= oddK) , INDEX(oddarray, k, m), INDEX(evenarray, k-oddK, m) )
If both errors are empty you may wrap IF by IFERROR and return something like "empty table"