You should be able to use =SUMIFS()
to get the hours during the pay period.
=SUMIFS(B:B,A:A,">="&F4,A:A,"<="&G4)
Here,
- column A contains the dates,
- column B contains the hours,
- cell F4 is the Earnings start date,
- cell G4 is the Earnings end date.