I have an array formula that essentially needs to sum a set of values in one range when cells in another range contain text.
To do this i'm using an array formula which compares two ranges. One range contains text cells the other values. Whenever a cell in the first range contains text I want to sum the values of the second range in the corresponding row. If I enter the ranges specifically the formula works. However I want to make the formula generic so that it deals with new rows within the work sheet and I can copy it to additional columns. To this end I was using ROW() and COLUMN() functions within the ADDRESS() function.
This is where I hit the problem. The formula no longer works stating a value has the wrong data type.
=SUM(ISTEXT(INDIRECT(ADDRESS(ROW()+1,4)&":"&ADDRESS(G5,4)))*INDIRECT(ADDRESS(ROW()+1,COLUMN())&":"&ADDRESS(G5,COLUMN())))
G5 contains the max row number for the table.
Any help would be gratefully received. I've attached a snippet of the full worksheet to show the problem.
Bookmarks