View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Bernard Liengme Bernard Liengme is offline
external usenet poster
 
Posts: 4,393
Default Counting different workinghour types

Total hours worked (formula in E7) =D7-C7 Hours outside evening
time (formula in F7) =(TIME(18,0,0)-C7)+(D7-TIME(21,0,0))
Hours during evening time (formula in G7) =E7-F7
With 15:30 and 23:59, we get
8:29
5:29
3:00
Or one formula
=(D7-C7)-((TIME(18,0,0)-C7)+(D7-TIME(21,0,0)))
best wishes
--
Bernard V Liengme
www.stfx.ca/people/bliengme
remove caps from email

"Wanderer" wrote in message
...
I have a problem
Itry to calculate with excel how much night hours evening hours i have
done
example
Working hours are starting time in c7 15:30 and end time D7 23:59 and if i
get extra pay between 18:00 and 21:00 how can i calculate these hours in
evening bonuses