Excel sumifs multi-condition summation

Background:
table name t

corresponding column A B C D E F G
table field date Tourist place source of customers visitor's home tourist's workplace number of people month
type of data varchar varchar varchar varchar varchar int varchar
sample 2022-06-01 Guangdong Hainan Haikou \N 5 06

Request:
I want to calculate the total number of tourists from Hainan with the month = "05" or "06" or "04" through sumifs

writable


SUM(SUMIFS(t!$F:$F,t!$C:$C,"海南",t!$G:$G,{
    
    "04","05","06"}))

Further appeal I want to calculate the total number of tourists from Hainan and Shanghai
with the month = "05" or "06" or "04" through sumifs . At this time, it cannot be superimposed and used. I don't know how to change it yet.

SUM(SUMIFS(t!$F:$F,t!$C:$C,{
    
    "海南","上海"},t!$G:$G,{
    
    "04","05","06"}))

changed to

SUM(SUMIFS(t!$F:$F,t!$C:$C,"海南",t!$G:$G,{"04","05","06"}),SUMIFS(t!$F:$F,t!$C:$C,"上海",t!$G:$G,{"04","05","06"}))

that's it

Guess you like

Origin blog.csdn.net/u012076669/article/details/126193564