I have long table which looks like this:[TABLE="class: grid, width: 300"]
<tbody>[TR]
[TD][/TD]
[TD="align: center"]A[/TD]
[TD="align: center"]B[/TD]
[TD="align: center"]C[/TD]
[TD="align: center"]D[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]Date[/TD]
[TD]Order no.[/TD]
[TD]Value[/TD]
[TD]State[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
When I need to get a subtotal of the values state-wise I use the array forumula:
={Sum(if(D2:D200="Name of State",C2:C200,0))}
Now, when I use the same formula for a month-wise subtotal in following way,
={Sum(if(D2:D200="Name of Month",C2:C200,0))}
I am not getting the desired result. What is the right syntax to use for this purpose?
<tbody>[TR]
[TD][/TD]
[TD="align: center"]A[/TD]
[TD="align: center"]B[/TD]
[TD="align: center"]C[/TD]
[TD="align: center"]D[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]Date[/TD]
[TD]Order no.[/TD]
[TD]Value[/TD]
[TD]State[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
When I need to get a subtotal of the values state-wise I use the array forumula:
={Sum(if(D2:D200="Name of State",C2:C200,0))}
Now, when I use the same formula for a month-wise subtotal in following way,
={Sum(if(D2:D200="Name of Month",C2:C200,0))}
I am not getting the desired result. What is the right syntax to use for this purpose?