+ Reply to Thread
Results 1 to 5 of 5

Using SUMIF to calculate SUM over 30, 90, 365 day period

  1. #1
    Registered User
    Join Date
    10-07-2008
    Location
    Indonesia
    Posts
    3

    Using SUMIF to calculate SUM over 30, 90, 365 day period

    I have a logbook which already uses a number of SUMIF formulas but have been trying to create one so that totals the number of hours flown in the above mentioned periods.

    Basically I am attempting to copy the formula and then modify for the relevant column in this case:

    =SUM(IF(FlightDates<(TODAY()-90), 0, FlightLength))

    FlightDates is the named range of the calender date in column A and FlightLength is the named range for total flying in column Z.

    However even though this forumla works in another situation e.g. tracking number of landings in the last 90 days, it comes up with an error.

    Any ideas?

    Cheers,
    c208b
    Last edited by c208b; 10-07-2008 at 08:45 PM.

  2. #2
    Registered User
    Join Date
    10-07-2008
    Location
    Wessex
    Posts
    55
    This is an array formula, so you need to enter it with Ctrl-Shift-Enter, not simply Enter.

  3. #3
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675
    That formula will total flightlengths for flights older than 90 days, if you want to total flightlengths within the last 90 days then you'll need to reverse the <

    ...or use SUMPRODUCT, e.g.

    =SUMPRODUCT(--(FlightDates>TODAY()-90),FlightLength)

  4. #4
    Registered User
    Join Date
    10-07-2008
    Location
    Indonesia
    Posts
    3
    daddylonglegs, that it so much simpler and it works a charm, thanks so much.

    Cheers,
    c20b

  5. #5
    Registered User
    Join Date
    01-12-2012
    Location
    australia
    MS-Off Ver
    Excel 2011
    Posts
    1

    Re: Using SUMIF to calculate SUM over 30, 90, 365 day period

    Hi Dadddylonglegs,

    I tried your formulas above wanting the same result but it seems to be adding all the data in the respective range(column), not just the last 7 days, any idea what I'm doing wrong?? here's my formula :

    =SUM(IF(flightdates<(TODAY()-6), 0, dailyflyinghours))

    thanks

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Formula to calculate Period & Week into Date?
    By AstroPenguin in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 09-17-2008, 08:12 PM
  2. Using the SUMIF function to calculate mutiple columns
    By PChav in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 09-08-2008, 11:05 AM

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