Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default SUMIF with 2 criterias

I'm using a sumif formula which is working to calculate a sum of data on a
sheet but it is calculating the sum for the entire sheet which goes back five
years. I only want the sum for the previous 6 months which will automatically
update itself with the answer. the formula I have is
=SUMIF(Type,"P28R",Logbook!O:O)
where "type" is a column heading and P28R is a criteria under the type
column and logbook is the name of the entire sheet in excel.

Thanks for any help!!!
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 169
Default SUMIF with 2 criterias

You want to use a SUMPRODUCT function

http://www.kan.org/tips/excel_sumproduct_advanced1.php

Your formula would be something like this:

=SUMPRODUCT(--(time(today()-180)),--(Type="P28R"),Logbook!O:O)

whe

Time = the range of cells with your dates
Type = the range of cells with all of your classifications

--
Tips for Excel, Word, PowerPoint and Other Applications
http://www.kan.org/tips


"tiger_27" wrote:

I'm using a sumif formula which is working to calculate a sum of data on a
sheet but it is calculating the sum for the entire sheet which goes back five
years. I only want the sum for the previous 6 months which will automatically
update itself with the answer. the formula I have is
=SUMIF(Type,"P28R",Logbook!O:O)
where "type" is a column heading and P28R is a criteria under the type
column and logbook is the name of the entire sheet in excel.

Thanks for any help!!!

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,420
Default SUMIF with 2 criterias

There is a fundamental flaw with this formula. Unless you are using Excel
2007, you CANNOT use whole clumns in SUMPRODUCT, it must be explicit ranges.

Also, you should specify what constitutes 6 months, 183 days ago, anything
in the months prior to say February as of today, anything prior to 21st
January prior to today. Assuming anything rpior to 21st Jan, use

=SUMPRODUCT(--(LogBook!A2:A200=DATE(YEAR(TODAY()),MONTH(TODAY() )-6,DAY(TODAY()))),
--(Logbook!B2:B200="P28R"),Logbook!O2:O200)


--
__________________________________
HTH

Bob

"M Kan" <tipsoftheweek at gmail dot com wrote in message
...
You want to use a SUMPRODUCT function

http://www.kan.org/tips/excel_sumproduct_advanced1.php

Your formula would be something like this:

=SUMPRODUCT(--(time(today()-180)),--(Type="P28R"),Logbook!O:O)

whe

Time = the range of cells with your dates
Type = the range of cells with all of your classifications

--
Tips for Excel, Word, PowerPoint and Other Applications
http://www.kan.org/tips


"tiger_27" wrote:

I'm using a sumif formula which is working to calculate a sum of data on
a
sheet but it is calculating the sum for the entire sheet which goes back
five
years. I only want the sum for the previous 6 months which will
automatically
update itself with the answer. the formula I have is
=SUMIF(Type,"P28R",Logbook!O:O)
where "type" is a column heading and P28R is a criteria under the type
column and logbook is the name of the entire sheet in excel.

Thanks for any help!!!



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
sumif with multiple criterias Doug Excel Worksheet Functions 2 August 18th 07 08:22 AM
Sumif with two criterias leung Excel Worksheet Functions 1 November 10th 06 05:14 AM
Sumif with two criterias gibz Excel Worksheet Functions 3 July 19th 06 05:52 PM
I want to use the same function as SUMIF, but for two criterias Lars F Excel Worksheet Functions 3 August 22nd 05 05:46 PM
SUMIF with 2 criterias Laddy Excel Worksheet Functions 10 April 25th 05 01:48 PM


All times are GMT +1. The time now is 07:14 PM.

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

About Us

"It's about Microsoft Excel"