Time and day sheet

John Smucker

New Member
Joined
Jul 22, 2022
Messages
34
Office Version
  1. 365
  2. 2016
Platform
  1. Windows
Here I have a spreadsheet where we are trying to find the average days that employees worked in one year.. Attached I have an example of the Sheet (January).
If the column "Start time" contains either Pd Holiday, Pd Vacation, or Pd Sick, I want it to return the value of a full day (9.00 Hrs.) or if it does not contain any of these and contains a time value instead I want it to calculate the duration between "Start time" and "Finish time"
Now, if column "Start Time" contains Nonpaid Holiday, Nonpaid Sick, or Nonpaid Vacation I want it to return 0.00
What formula should I use to tie all these together?
Paid Holiday,Sick, and Vac or calculate time duration or if Nonpaid Holidays Sick or Vac return 0.00
 

Attachments

  • Time Card sheet.PNG
    Time Card sheet.PNG
    30.2 KB · Views: 11

Excel Facts

Which lookup functions find a value equal or greater than the lookup value?
MATCH uses -1 to find larger value (lookup table must be sorted ZA). XLOOKUP uses 1 to find values greater and does not need to be sorted.
I included conditions in case the values are in End Time cell.

Book1
ABC
28:45 AM5:00 PM8.25
3Nonpaid Holiday0.00
4Pd Holiday9.00
Sheet1
Cell Formulas
RangeFormula
C2:C4C2=IF(OR(OR(A2="Pd Holiday",A2="Pd Vacation",A2="Pd Sick"),OR(B2="Pd Holiday",B2="Pd Vacation",B2="Pd Sick")),9,IF(OR(OR(A2="Nonpaid Holiday",A2="Nonpaid Vacation",A2="Nonpaid Sick"),OR(B2="Nonpaid Holiday",B2="Nonpaid Vacation",B2="Nonpaid Sick")),0,(B2-A2)/0.0416666666666667))
 
Last edited:
Upvote 0
Solution
Thank you!
I made a few changes but this helped me understand the if and or function...
 
Upvote 0

Forum statistics

Threads
1,214,415
Messages
6,119,382
Members
448,889
Latest member
TS_711

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