I seem to be stuck trying to use multiple variables in an array statement.
Right now it sums everything if the first expression passes, so if the Hours column A matches HR!$A5 then it will sum all that match, disregarding the OR statement and additional matches.
Note I'm trying to use an OR statement because some of the other expressions I am trying to do are too long (above 255 char). Any advice on how to get this to work? I want to check Column A on HR sheet against A5, and then see if the B column makes additional matches to only sum up those.
EDIT: This formula below works, but once I start adding more 'OR' statements it becomes too long and reaches the char limit:
Code:
=SUM(IF(Hours!$A$2:$A$13189=HR!$A5,IF(OR(Hours!$B$2:$B$13189="ENG",Hours!$B$2:$B$13189="SNRENG"),Hours!$D$2:$D$13189,),))
Right now it sums everything if the first expression passes, so if the Hours column A matches HR!$A5 then it will sum all that match, disregarding the OR statement and additional matches.
Note I'm trying to use an OR statement because some of the other expressions I am trying to do are too long (above 255 char). Any advice on how to get this to work? I want to check Column A on HR sheet against A5, and then see if the B column makes additional matches to only sum up those.
EDIT: This formula below works, but once I start adding more 'OR' statements it becomes too long and reaches the char limit:
Code:
=SUM(IF(Hours!$A$2:$A$13189=HR!$A5,IF(Hours!$B$2:$B$13189="ENG",Hours!$D$2:$D$13189,),),IF(Hours!$A$2:$A$13189=HR!$A5,IF(Hours!$B$2:$B$13189="SNRENG",Hours!$D$2:$D$13189,),))
Last edited: