My COUNTIFS formula is:
...where EmpRange and DateRange are named ranges, $A$2:$A$100 (for names, e.g., "Bob" etc.) and $B$2:$B$100 (which contains various dates) ...and DateFrom and DateTo are named cells. When I have an actual date in the named date cells, for example, 9/1/14 for DateFrom, and 9/12/14 for DateTo (USA short format) - the formula works great and returns all the "Bobs" between the specified dates.
But I need the option of leaving either or both of the named date cells BLANK, and for my formula to return the following:
IF DateFrom is blank, but there is a date in DateTo, then calculate the criteria for ALL the dates with "Bill" (following this example) on or before the "To" date (no begin date).
Conversely, if DateTo is BLANK, but DateFrom has a date value, then run the formula calculating from the begin date specified, but no end date (technically, this could be a date in the future, but as I don't think I should have any when I put the workbook in use, so I could use until TODAY if it made a difference)... finally, if both DateFrom and DateTo are blank, return all "Bills" - basically ignoring the dates.
Any suggestions?
Bookmarks