Vague, wishy-washy title I know, but I'm not particularly with it today, which is probably why this is alluding me.
I have an annual leave sheet with the days of the week typed across the second row down, underneath which are the hours worked on each particular day. Above each day is the Excel value for each day (Sunday=1, Monday=2 etc). A bit like this:
2 3 4 5 6
Mon Tue Wed Thu Fri
7.5 7.5 3.5 3.5 7.5
Date From Date to Leave to be taken
09/08/2010 12/08/2010
What I want is for the required annual leave to be calculated in the 'Leave to be taken' column based on the dates entered. E.g. with the example above, I want Monday through Thursday summing and Friday ignoring. Likewise if the last date was 11/08/2010 I'd want Monday through Wednesday summing.
I'm using the Weekday() function with HLookup to match the dates to the day values on the top line, but I don't know how to sum the values between the given dates.
I'm doing it this way because our staff all work weird hours so there isn't a 'one size fits all' spreadsheet. I know there must be way to do this, and with formulae (formulas?) I'm usually pretty good, but this is just to working out.
Any ideas?
Bookmarks