Forum Discussion
jaolvera
Dec 08, 2023Brass Contributor
formula "if" "and"
I need help with calculating a formula for tab 1 (see attachment) that if tab 2 column A contains the month "january" than add the totals for "staff+" (Column C). Thank you!
jaolvera
Dec 09, 2023Brass Contributor
yes tab 2 column will have months as text, then what I want to do is calculate or add the values in column C that correlate to january. I.e if there are 3 lines that have january with the value of 1 in each then I want the sum of all 3 of those to populate in tab 1 in that specific cell.
mtarler
Dec 09, 2023Silver Contributor
ok then use SUMIF or SUMIFS
=SUMIFS( Tab2!C:C, Tab2!A:A, "January")
or you could base it on the cell on Tab1 (I think that January is in cell B5)
=SUMIFS( Tab2!C:C, Tab2!$A:$A, $B$5 )
=SUMIFS( Tab2!C:C, Tab2!A:A, "January")
or you could base it on the cell on Tab1 (I think that January is in cell B5)
=SUMIFS( Tab2!C:C, Tab2!$A:$A, $B$5 )
- jaolveraDec 11, 2023Brass Contributor
- mtarlerDec 11, 2023Silver Contributor
jaolvera My guess is that the January don't match because 1 is 'text' and the other is 'date' (unless the values 1,2,3 are text but doubt that). Just because it shows "January" doesn't mean it is a 'text' value. See this image:
A12 is a 'text' value = "January" but A13 is a 'date' value being shown as the month text. Notice the formula bar above shows 1/1/2023 even though the cell shows "January".
If this isn't the problem please share the sheet for me to see what else it might be. (if you can't post here you can PM it to me)