Countif function to count as a half

Minty5490

New Member
Joined
Jul 13, 2016
Messages
14
I have a Key Section see belowH = 1 Full day holidayHD = 0.5 half day holidayI am trying to pull this into a summary sheet to add up. Each staff names are in rows with each have a cell under Jan to a total Holidays, but it adds H as 1, and HD as 1. When I want it to record HD as 0.5 half day off. These have to be in Letters, as the letters are keyed into a calendar showing H and HD etc, when some books a holiday.My formula is=SUM(COUNTIFS(Jan!D7:AH7,{"H","HD"}))
Jan Sheet Range of the dates 1st to the 31 month, H is holiday, HD half day holiday
where do I input a formula to ask it to make the HD a 0.5 half day holiday? thanks :)
 

Excel Facts

Add Bullets to Range
Select range. Press Ctrl+1. On Number tab, choose Custom. Type Alt+7 then space then @ sign (using 7 on numeric keypad)
Minty5490,

Two possibilities are....

=COUNTIFS(Jan!D7:AH7,"H")+COUNTIFS(Jan!D7:AH7,"HD")/2

=SUMPRODUCT((D7:AH7="H")+(D7:AH7="HD")/2)

Hope that helps.
 
Upvote 0

Forum statistics

Threads
1,224,817
Messages
6,181,144
Members
453,021
Latest member
Justyna P

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
Back
Top