# Sumproduct for holiday calendar

#### thorpyuk

##### Well-known Member
Hiya,

Making an easy job complicated, i have a spreadsheet with colleague days off on holidays.

Down column A are my colleague names, and then across the next 5 columns are monday-friday. This is then replicated down rows for each week, so week 1 is directly under week 2 etc etc.

Now in a cell where someone is off on holiday is either "hol" for 1 days holiday, or "hol half day" for a half days holiday.

How might i use sumproduct to add up all a persons holiday days taken?

Thanks!

### Excel Facts

Author John Walkenbach was Mr Spreadsheet until his retirement in June 2019.

#### DonkeyOte

##### MrExcel MVP
=SUMPRODUCT((\$A\$2:\$A\$13=\$G3)*(\$B\$2:\$F\$13="hol"))+(SUMPRODUCT((\$A\$2:\$A\$13=\$G3)*(\$B\$2:\$F\$13="hol half day"))/2)

my example is based on limited range row 2 to 13 and I had ee name in cell G3

#### schielrn

##### Well-known Member
Can you not just use countif on the range for each employee?

=countif(B1:F100,"hol")+countif(B1:F100,"hol half day")*.5

Hope that helps. I assume the name is just once in column A with 52 rows for each week, but would need a little better description for the layour if this is not what you were looking for?

Replies
2
Views
815
Replies
3
Views
849
Replies
3
Views
349
Replies
1
Views
513
Replies
4
Views
428

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

1,163,649
Messages
5,832,879
Members
430,175
Latest member
Sheenamarie

### We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.

### Which adblocker are you using?

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

### Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

### Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back