[Solved] sum visitors in certain dates and another condition

hajjash

New member
hello,
I have table 1, and i want to fill in the total visits per week in table 2. I have filled in the values manually, however I wish to do this with a formula.

My conditions are:
If certain date, and "School" column is not empty then add the number of visits.

For example:
If date = 10-Dec or 11-Dec and respective value under "School" is not empty then add the number of visitors.

I appreciate the help.


Table 1

Week​
DateSchoolVisitors
1​
10-Dec​
school1​
10​
1​
11-Dec​
school2​
20​
2​
12-Dec​
school3​
30​
2​
13-Dec​
school4​
40​
3​
14-Dec​
school5​
50​
3​
15-Dec​
school6​
60​

Table 2

total visits​
week 1​
30​
week 2​
70​
week 3​
110​
 

Attachments

hello,
I have table 1, and i want to fill in the total visits per week in table 2. I have filled in the values manually, however I wish to do this with a formula.

My conditions are:
If certain date, and "School" column is not empty then add the number of visits.

For example:
If date = 10-Dec or 11-Dec and respective value under "School" is not empty then add the number of visitors.

I appreciate the help.


Table 1

Week​
DateSchoolVisitors
1​
10-Dec​
school1​
10​
1​
11-Dec​
school2​
20​
2​
12-Dec​
school3​
30​
2​
13-Dec​
school4​
40​
3​
14-Dec​
school5​
50​
3​
15-Dec​
school6​
60​

Table 2

total visits​
week 1​
30​
week 2​
70​
week 3​
110​

Hi Hajjash,
Thanks for sharing your problem with us! I have solved your problem. [see the image below]
1702275056561.png

Here, I have used an Excel SUMIFS formula that calculates the sum of values in column C (likely representing the number of visitors) based on three criteria. It considers only rows where the corresponding date in column A falls within the range specified by cells F4 (start date) and G4 (end date), and where the corresponding value in column B (presumably, representing schools) is not blank.

Also, I've attaced the workbook for your convenience. Please inform us in the reply if you have any further queries.

Best Regards,
ExcelDemy Team
 

Attachments

Hi Hajjash,
Thanks for sharing your problem with us! I have solved your problem. [see the image below]
View attachment 1132

Here, I have used an Excel SUMIFS formula that calculates the sum of values in column C (likely representing the number of visitors) based on three criteria. It considers only rows where the corresponding date in column A falls within the range specified by cells F4 (start date) and G4 (end date), and where the corresponding value in column B (presumably, representing schools) is not blank.

Also, I've attaced the workbook for your convenience. Please inform us in the reply if you have any further queries.

Best Regards,
ExcelDemy Team
Thank you very much. I love it when excel works, worked like a charm
 

Online statistics

Members online
0
Guests online
165
Total visitors
165

Forum statistics

Threads
459
Messages
2,046
Members
2,140
Latest member
megarsteelcomvn
Back
Top