I have the following formula:
=SUM(SUMIFS(TSB!$I$5:$I$91,TSB!$J$5:$J$91,{"MA","MI","EQ"},TSB!$U$5:TSB!$U$91,"=MAR"))
It works perfectly.
MA, MI and EQ are Cost Codes, there could be up to 6. MAR is the Department. There are over 50 rows, each a unique combination of Cost Codes and Departments.
I want to put the Cost Code values into Z1 - Z6 and the Department into Z7. There will be at least one Cost Code 99% of the time but never more than 6. Therefore there could be blanks. There will always only be a single Department.
Question 1: What is the exact syntax for referencing a cell in the array? I get confused about "&" and where my quotes go.
Question 2: Occasionally a Cost Code might not have been allocated. As I have it at the moment (hard-coded) it will never pick up these blanks. As it is highly likely that there will blank cells in Z2-Z6 returned, will it pick up the blanks in J5-J91?
Thanks, David (a newbie here and rapidly approaching age '3 score and 10').
=SUM(SUMIFS(TSB!$I$5:$I$91,TSB!$J$5:$J$91,{"MA","MI","EQ"},TSB!$U$5:TSB!$U$91,"=MAR"))
It works perfectly.
MA, MI and EQ are Cost Codes, there could be up to 6. MAR is the Department. There are over 50 rows, each a unique combination of Cost Codes and Departments.
I want to put the Cost Code values into Z1 - Z6 and the Department into Z7. There will be at least one Cost Code 99% of the time but never more than 6. Therefore there could be blanks. There will always only be a single Department.
Question 1: What is the exact syntax for referencing a cell in the array? I get confused about "&" and where my quotes go.
Question 2: Occasionally a Cost Code might not have been allocated. As I have it at the moment (hard-coded) it will never pick up these blanks. As it is highly likely that there will blank cells in Z2-Z6 returned, will it pick up the blanks in J5-J91?
Thanks, David (a newbie here and rapidly approaching age '3 score and 10').