I am using the formula below in a payroll spreadsheet (I was given A LOT of help by an awesome power user/moderator on this site) and I need it to be tweaked a little, but am not sure how to do it. 
Currently it is designed to look at an entry like "15 OT" and return the number 15 (J2 being the cell containing the reference to look for (OT)). I would like the formula to allow for finding another code in the reference cell as well.
Ex. If the cell contains "15 OT STAT", return the number 15 when searching for OT, as well as searching for STAT
Currently it will only return the number 15 if I am searching for the first 'chunk' of my payroll code (the OT, but not the STAT)
=SUM(IF(ISNUMBER(LEFT($C5:$I5,FIND(" "&J$2&" "," "&$C5:$I5&" ")-1)+0),LEFT($C5:$I5,FIND(" "&J$2&" "," "&$C5:$I5&" ")-1)+0))
Any help would be greatly appreciated!
Bookmarks