Monday Morning Mulling: March 2022 Challenge
28 March 2022
On the final Friday of each month, we set an Excel / Power Pivot / Power Query / Power BI problem for you to puzzle over for the weekend. On the Monday, we publish a solution. If you think there is an alternative answer, feel free to email us. We’ll feel free to ignore you.
The challenge this month was to create a formula for finding first visible cell in a range. Easy, yes?
In this challenge, we required you to create a formula for finding first visible cell in a filtered range without using VBA and macros.
You can download the question file here.
As always, there was a requirement:
- this was a formula challenge; no Power Query / Get & Transform or VBA!
You can find our Excel file here which demonstrates our suggested solutions. However, before explaining our solutions, we will clarify the common idea how we came up with them first.
For Excel Office 365, Excel on the Web and Office Beta / Insider versions:
These Excel versions allow us to use Dynamic Arrays which help shorten a lot of steps.
To begin with, we can generate a new column using SUBTOTAL function which comes up with subtotal in given list or database. Do not forget to use the COUNTA function in SUBTOTAL function as the given data consists of text.
Finally, the FILTER function of dynamic arrays is used in order to find the first visible cell in each range and using the following formula:
The resulting list will be spilled range created by the formula above written in only cell N13 as below:
For all current Excel versions:
As there is no FILTER function (i.e. Dynamic Array functions) in other Excel versions, firstly we need to create a few helper columns. To begin with we will be using the ROW function in order to find out the row number of the given data by:
Then, the next step would be to find out the counter number for each month through:
The next step would be to use INDEX function inside OFFSET function in order to find out the given month for each counter number using :
Next step would be to use the COUNTA function inside SUBTOTAL in order to count visible text on each row of 'Offset' column by:
Then, we can use IF function in order to return the row number against the 'Subtotal' column using:
The next step is to find out row number of the first visible cell using MIN formula for 'If' column:
The final step would be to use INDEX function in order to find out the first visible cell in the given range by:
The Final Friday Fix will return on Friday 29 April 2022 with a new Excel Challenge. In the meantime, please look out for the Daily Excel Tip on our home page and watch out for a new blog every business working day.