I am trying to create a spreadsheet in Excel that basically help me on counting my total daily allowance and takes account on leap years and number of user-defined "number of holidays" (where I don't get my daily allowance) per month, and also calculate it either in a year or in a certain time period (i.e. January to March).

I have a table in a different sheet which defines the month and number of days, i.e. January has 31 days, March has 31 days, etc.

Therefore, is there an automated way to calculate the total of days selected based on user selection of a time period (i.e cell one defines the starting month, and then cell two define the ending month) from a table of data described above?