How do I use INDIRECT inside an Excel array formula?
Clash Royale CLAN TAG#URR8PPP
How do I use INDIRECT inside an Excel array formula?
The following formula returns all the correct references to hours booked on "Foo", so far so good.
=IF(Planning!$D$11:$CV$18="Foo";ADDRESS(ROW(Planning!$D$11:$CV$18);COLUMN(Planning!$D$11:$CV$18)+1;;;"Planning"))
"Planning!$E$11"FALSEFALSEFALSEFALSE"Planning!$J$12"
However, if I use the INDIRECT function to retrieve the values of those references, they always return the value of the first reference in the array ("Planning!$E$11")
=IF(Planning!$D$11:$CV$18="Foo";INDIRECT(ADDRESS(ROW(Planning!$D$11:$CV$18);COLUMN(Planning!$D$11:$CV$18)+1;;;"Planning")))
8FALSEFALSEFALSEFALSE8
How do I retrieve the correct values? Or should I tackle the problem in a whole different way?
The way you are using indirect currently, is finding the value of the first cell in your reference range (e11 being one column to the left of d11).
– a-burge
Aug 8 at 10:26
Thanks. I added the screenshots. By the way, wrapping the INDIRECT around the array is not a solution either: all FALSE Booleans are converted to #REF!, which renders the array unusable for SMALL.
– krowl
Aug 8 at 11:26
Due to the format of the data, it would not be possible to generate the overview you are aiming to, however, you can use formulas to generate a consolidation table then use a PivotTable to generate the desired summary.
– EEM
Aug 10 at 20:36
1 Answer
1
Since I was mainly interested in the total of planned hours, I eventually used the following formula:
=SUM(SUM(INDIRECT(IF(Planning!$D$11:$CV$18="Foo";(ADDRESS(ROW(Planning!$D$11:$CV$18);COLUMN(Planning!$D$11:$CV$18)+1;;;"Planning"));"$U$19"))))
By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.
I'm not sure indirect is what you want to use. Difficult to say though, do you have an example (screenshot or something similar) of the data and expected outcome?
– a-burge
Aug 8 at 10:21