I want to sum the values that are in the "Time" columns but return 0
I tried the following formula:
=SUMIF(C2:H2,"Time*",C3:H3)
=SUMIF(SCRATCH031342[#Headers],"Time*",C3:H3)
CodePudding user response:
You can use:
=SUM(INDEX(C3:H4,0,MATCH(C6,C2:H2,0)))
and fill in cell C6
with the desired column name
CodePudding user response:
Sum Up Numbers As Text
For the first row of data, you could use
=SUMPRODUCT(--(LEFT(C$2:H$2,4)="Time"),VALUE(C3:H3))
or
=SUMPRODUCT(--(LEFT(SCRATCH031342[#Headers],4)="Time"),VALUE(C3:H3))
and copy down.
Additionally, if you'll write the results in the same row as the table row (e.g. in cell J3
), you should simplify the table version with:
=SUMPRODUCT(--(LEFT(SCRATCH031342[#Headers],4)="Time"),VALUE(SCRATCH031342[@]))