thank youyou could use a number of sumif() + sumif()
=SUMIF(C3:C29,"ocr",D3:D29)+ SUMIF(C3:C29,"efr",D3:D29) +SUMIF(C3:C29,"ocrd",D3:D29)+SUMIF(C3:C29,"efrd",D3:D29)
format the cell as [H]:MM to see over 24hours time
ocr,efr,ocrd,efrd
OR if you have a later version of excel with the FILTER() function
=SUM(FILTER(D3:D29,(C3:C29="ocr")+ (C3:C29="efr") +(C3:C29="ocrd") +(C3:C29="efrd")))
and also there is a way to use {} for the criteria - =SUM(SUMIF(C3:C29,{"ocr","efr","ocrd","efrd"},D3:D29))
Unless you have 2003 or older, that formula should work.=SUM(SUMIFS(D3:D29,C3:C29,{"ocr","efr","ocrd","efrd"},A3:A29,1,B3:B29,">="&TIMEVALUE("06:00:00"),B3:B29,"<="&TIMEVALUE("18:00:00"))) this is not working in older versions of excel