Results 1 to 5 of 5

HLookup: sum of all cells in between 2 values

Threaded View

  1. #1
    Registered User
    Join Date
    11-07-2008
    Location
    Lincoln
    Posts
    17

    HLookup: sum of all cells in between 2 values

    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?
    Last edited by bglaugh; 06-14-2010 at 09:12 AM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1