Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
qflyer
 
Posts: n/a
Default Summing with multiple criteria


I have a pilot logbook in a spreadsheet. Column A is the date of every
flight flown in the past 5 years. Column G is the number of landings
made on each flight. If the flight was at night, the number of hours
(such as 1.2 or 3.6) is entered in column L. If the value in L is 0,
it is assumed the flight was in the day time.

To remain current, I have to make at least 3 landings at night. So I
need a formula that would look at each flight in the past 90 days
(Column A), look to see if the flight was at night (Column L), and then
if the date is within the past 90 days, and the night hours column is
greater than 0, it should total the number of landings (Column G). Can
SUMIF look at multiple ranges or do I need a different formula?

Hope this is clear enough...

Thanks in advance,
Scott


--
qflyer
------------------------------------------------------------------------
qflyer's Profile: http://www.excelforum.com/member.php...o&userid=24448
View this thread: http://www.excelforum.com/showthread...hreadid=380762

  #2   Report Post  
Biff
 
Posts: n/a
Default

Hi!

Try this:

=SUMPRODUCT(--(A2:A100=TODAY()-90),--(L2:L1000),G2:G100)

Adjust ranges to suit.

Note: Sumproduct will not accept whole columns as range arguments: A:A, L:L,
G:G

Biff

"qflyer" wrote in
message ...

I have a pilot logbook in a spreadsheet. Column A is the date of every
flight flown in the past 5 years. Column G is the number of landings
made on each flight. If the flight was at night, the number of hours
(such as 1.2 or 3.6) is entered in column L. If the value in L is 0,
it is assumed the flight was in the day time.

To remain current, I have to make at least 3 landings at night. So I
need a formula that would look at each flight in the past 90 days
(Column A), look to see if the flight was at night (Column L), and then
if the date is within the past 90 days, and the night hours column is
greater than 0, it should total the number of landings (Column G). Can
SUMIF look at multiple ranges or do I need a different formula?

Hope this is clear enough...

Thanks in advance,
Scott


--
qflyer
------------------------------------------------------------------------
qflyer's Profile:
http://www.excelforum.com/member.php...o&userid=24448
View this thread: http://www.excelforum.com/showthread...hreadid=380762



  #3   Report Post  
qflyer
 
Posts: n/a
Default


That works just fine...while I was messing around with it myself, I
found that =SUM(IF((A50:A3000TODAY()-90)*(L50:L30000),H50:H3000))
also works...any ideas on which formula works "best"? They both find
the same answer, but I will be using various forms of the formula in
over 70 cells which are updated constantly when I add in a new flight.
I found that the
=SUM(IF((A50:A3000TODAY()-90)*(L50:L30000),H50:H3000)) formula causes
a slight slow down (recalculating the sheet takes about .5 seconds,
before adding in the new formulas it was immediate) when entering a new
flight.


--
qflyer
------------------------------------------------------------------------
qflyer's Profile: http://www.excelforum.com/member.php...o&userid=24448
View this thread: http://www.excelforum.com/showthread...hreadid=380762

  #4   Report Post  
Biff
 
Posts: n/a
Default

Hi!

The =Sum(IF.....) version is an array formula and in most cases array
formulas take more resources (time to calc, disk space that translates into
larger file size and memory useage) than non-array formulas.

What makes Sumproduct such a robust function is that it accepts arrays as
arguments and in most cases, is more efficient than an array formula. I
guess the general rule of thumb is if you can avoid using an array formula,
do so.

Biff

"qflyer" wrote in
message ...

That works just fine...while I was messing around with it myself, I
found that =SUM(IF((A50:A3000TODAY()-90)*(L50:L30000),H50:H3000))
also works...any ideas on which formula works "best"? They both find
the same answer, but I will be using various forms of the formula in
over 70 cells which are updated constantly when I add in a new flight.
I found that the
=SUM(IF((A50:A3000TODAY()-90)*(L50:L30000),H50:H3000)) formula causes
a slight slow down (recalculating the sheet takes about .5 seconds,
before adding in the new formulas it was immediate) when entering a new
flight.


--
qflyer
------------------------------------------------------------------------
qflyer's Profile:
http://www.excelforum.com/member.php...o&userid=24448
View this thread: http://www.excelforum.com/showthread...hreadid=380762



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Multiple Criteria (add or subtract) MJSlattery Excel Discussion (Misc queries) 1 June 11th 05 05:38 PM
Multiple Criteria IF Nesting BethB Excel Worksheet Functions 2 May 17th 05 12:14 AM
Can I get the mode, min, and max with multiple criteria? BobT Excel Discussion (Misc queries) 1 February 15th 05 03:20 AM
sumproduct using multiple criteria tifosi3 Excel Worksheet Functions 2 January 6th 05 08:46 PM
Counting "rows", i.e. simultaneous criteria for multiple cells gkline Excel Worksheet Functions 2 November 19th 04 07:30 AM


All times are GMT +1. The time now is 01:45 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"