I am trying to find the sum of a given row using multiple conditions.
Row 1 has the YEAR
Row 2 has the MONTH
Row 7 has the HOURS
I want to sum row 7 where the Year=2008 AND Month=January.
I used the following formulas and got the following results:
=SUM(IF((('Data (OT)'!C1:FE1="2008")+('Data (OT)'!C2:FE2="January")),'Data (OT)'!C7:FE7,0))
This gives me a high number. I believe it gives me the hours where the month is January, but completely ignores the year condition.
However, if I replace the + with * ... =SUM(IF((('Data (OT)'!C1:FE1="2008")*('Data (OT)'!C2:FE2="January")),'Data (OT)'!C7:FE7,0)) the formula gives me a value of 0 (which is inaccurate).
Other formulas I used, which gave me a vlaue of 0:
=SUM(IF('Data (OT)'!C1:FE1="2008",IF('Data (OT)'!C2:FE2="January",'Data (OT)'!C7:FE7)))
=SUMPRODUCT(('Data (OT)'!C1:FE1="2008")*('Data (OT)'!C2:FE2="January")*('Data (OT)'!C7:FE7))
Please advise. Thanks.
Row 1 has the YEAR
Row 2 has the MONTH
Row 7 has the HOURS
I want to sum row 7 where the Year=2008 AND Month=January.
I used the following formulas and got the following results:
=SUM(IF((('Data (OT)'!C1:FE1="2008")+('Data (OT)'!C2:FE2="January")),'Data (OT)'!C7:FE7,0))
This gives me a high number. I believe it gives me the hours where the month is January, but completely ignores the year condition.
However, if I replace the + with * ... =SUM(IF((('Data (OT)'!C1:FE1="2008")*('Data (OT)'!C2:FE2="January")),'Data (OT)'!C7:FE7,0)) the formula gives me a value of 0 (which is inaccurate).
Other formulas I used, which gave me a vlaue of 0:
=SUM(IF('Data (OT)'!C1:FE1="2008",IF('Data (OT)'!C2:FE2="January",'Data (OT)'!C7:FE7)))
=SUMPRODUCT(('Data (OT)'!C1:FE1="2008")*('Data (OT)'!C2:FE2="January")*('Data (OT)'!C7:FE7))
Please advise. Thanks.