Share via

Array formula causing #VALUE error

Anonymous
2018-09-26T02:51:17+00:00

Have, what I think is, a correct formula that is only partially working.

=IF(Control_Category<>"",IF(Transaction_Type="Income",SUMPRODUCT((September!Budgeted_Income)*(September!Category=$A13)*(September!Budget_Date&"<="&TODAY())),SUMPRODUCT((September!Budgeted_Expense)*(September!Split_Receipt="")*(September!Category=$A13))),IF(INDIRECT(ADDRESS(ROW()-1,1))<>"",SUM(INDIRECT(ADDRESS(2,COLUMN())&":"&ADDRESS(ROW()-1,COLUMN()))),0))

Control_Category  and Transaction_Type are on the current sheet as 100 x 1 arrays.

September!Budgeted_Income is on a second sheet as a 300 x 1 array

September!Category is on another sheet as a 300 x 1 array

September!Budget_Date is on another sheet as a 300 x 1 array

Today() is, of course, today's date

As coded the formula, when Control_Category <>"" and Control_Category = "Income" I get a return of #ERROR instead of the Month-to-Date budget amount for income. When I remove the highlighted the formula works but produces the budget for the entire month instead of Month-to-Date.

The second half of the formula, which deals with expenses and does not test the date works fine.

Need some assistance please,

TheOldPuterMan

Microsoft 365 and Office | Excel | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

Answer accepted by question author

Anonymous
2018-09-26T05:53:46+00:00

TOPM,

Rewrite youre formule like this:

=IF(Control_Category<>"",IF(Transaction_Type="Income",SUMPRODUCT((September!Budgeted_Income)*(September!Category=$A13)*(September!Budget_Date<=TODAY())),SUMPRODUCT((September!Budgeted_Expense)*(September!Split_Receipt="")*(September!Category=$A13))),IF(INDIRECT(ADDRESS(ROW()-1,1))<>"",SUM(INDIRECT(ADDRESS(2,COLUMN())&":"&ADDRESS(ROW()-1,COLUMN()))),0))

and all will be fine.

So the quotes in & "<=" & where too much.

Jan

Was this answer helpful?

1 person found this answer helpful.
0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Anonymous
    2018-09-26T08:29:10+00:00

    Thank you!! Didn't even consider that but should have. Worked like a charm!

    TheOldPuterMan

    Was this answer helpful?

    0 comments No comments