Time Sheet Calculation - Adding a Condition

meppwc

Well-known Member
Joined
May 16, 2003
Messages
626
Office Version
  1. 365
Platform
  1. Windows
I have a spreadsheet that I use to track punch in/out as a work time sheet
Entries from B9 through E9 are my clock in/outs (Format is 8:00 that equals punch in at 8am)
In Cell F9 I have the following formula
=IF(COUNTBLANK(B9:E9)=0,(C9-B9)+(E9-D9),"")
The F9 formula tallies up B9-E9 and gives me the number of hours that I worked for that day
This formula works correctly
I would like to modify it to allow an additional condition in the event that I take a paid day off
If F9 is blank, then populate F9 with the value in I9 (the amount of total hours for a given day)

No matter which way I add this new condition to the formula it does not provide the expected result.
 

Excel Facts

Repeat Last Command
Pressing F4 adds dollar signs when editing a formula. When not editing, F4 repeats last command.
If there are no entries from B9-E9, then F9 is blank.............so for this day in I9 I would make an entry of 8:00 which is the total hours I would be paid for as a paid day off. That entry of 8:00 in I9 would need to appear in F9 as total hours paid for that particular day.
 
Upvote 0
I just got it to work
=IF(COUNTBLANK(B4:E4)=0,(C4-B4)+(E4-D4),I4)
 
Upvote 0

Forum statistics

Threads
1,223,909
Messages
6,175,313
Members
452,634
Latest member
cpostell

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