Sumproduct for holiday calendar

thorpyuk

Well-known Member
Joined
Mar 14, 2006
Messages
1,453
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

Remove leading & trailing spaces
Save as CSV to remove all leading and trailing spaces. It is faster than using TRIM().

DonkeyOte

MrExcel MVP
Joined
Sep 6, 2002
Messages
9,123
=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
Joined
Apr 4, 2007
Messages
6,939
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?
 

Watch MrExcel Video

Forum statistics

Threads
1,130,169
Messages
5,640,547
Members
417,151
Latest member
ChickenTenderer

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.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

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

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

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
Top