Calculating days formula Problem

MSconfusedX

New Member
Joined
Sep 16, 2011
Messages
5
Hey there,

I have a worksheet that calculates employers attendance.
For instance,

Cells from B7 to AE7 are divided into 30 days of the month, and in each cell the coordinator should fill in the number of hours the employer worked.
Cell AF calculates total number of hours
Formula:=SUM(B7:AE7)
Cell AG calculates number of days worked
Formula: =COUNTIF(B7:AE7,">0")

I have been trying to find a formula that would be put in Cell AG in which If the number of hours were more than 5 from cells B7 to AE7 it would count it as 2 days of working.

Is it possible, I imagine it with an if condition however, i'm not that expert with Excel.
 

Excel Facts

Test for Multiple Conditions in IF?
Use AND(test, test, test, test) or OR(test, test, test, ...) as the logical_test argument of IF.
i think this is what you want
=COUNTIF(B7:AE7,">5")+COUNTIF(B7:AE7,">0")

it takes your formula and counts each cell >0 and then counts those cells again if they are >5.
 
Upvote 0
Wouldn't just adding cells with hours over 5 to the value you now have to what you want?

=COUNTIF(B7:AE7,">0")+COUNTIF(B7:AE7,">5")
 
Upvote 0

Forum statistics

Threads
1,224,521
Messages
6,179,280
Members
452,902
Latest member
Knuddeluff

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