I advise you not to use coloring to indicate anything you would like to do calculations with later, instead, just add column in which you add status information (yes, no, Male, Female, Overdue or not, ...). Having done so you can easily use Excel's built-in functions such as SUMIFS or COUNTIFS.