K
K
KTG2021-12-15 05:23:05
excel
KTG, 2021-12-15 05:23:05

How to do a string search of all empty cells and return an array of column numbers (formula)?

There is a range: A1:E1
A1, B1, E1 - filled.
We need a formula that will return the indexes of the columns: C1 and D1 because they are empty.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
H
hint000, 2021-12-15
@hint000

and return an array of column numbers
Let's start with the fact that in Excel arrays are actually represented by pieces of a table. :) A formula can return an element of an array, not an array. The answer is in column C.
To translate the formula from LibreOffice to Excel, replace the commas between the arguments with a semicolon.
61b96b049132c611095152.png

G
Grigory Boev, 2021-12-15
@ProgrammerForever

New revisions have TEXTJOIN ()
You can get a sequence of indexes like this (introduced by an array formula 1 * 5 via Ctrl + Shift + Enter ):
=ЕСЛИ(A1:E1<>"";{1;2;3;4;5};{"";"";"";"";""})
In Google Sheets, you can use JOIN ()

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question