Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,574
Default summing values in a data table based on criteria in another column

I have a data table whose columns are arranged in the following manner, from
left to right:

Date | ArriveTime | LeaveTime |Hours | Overtime | Regular | Gross |
RunningGross | CumHours | $/Week

What I'm looking to do is sum the "Gross" column based on a period of dates,
say 8/1/06 through 8/31/06, and not select this range manually.

The Date column is column D and the Gross column is column J.

Ideas?
--
Brevity is the soul of wit.
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 510
Default summing values in a data table based on criteria in another column

Hi Dave,

Something along this line :

=SUMIF(D2:C100,""& DATE(2006,7,31),J2:E100) -
SUMIF(D2:C100,""& DATE(2006,8,31),J2:E100)

HTH
Cheers
Carim

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 4,339
Default summing values in a data table based on criteria in another column


=SUMPRODUCT(--(D2:D100=StartDate),--(D2:D100<=End date),(J2:J100))

where start/End dates are cells containing these values.

If you want to sum a calendar month e.g August:

=SUMPRODUCT(--(MONTH(D2:D100)=8),J2:J100)

HTH

"Dave F" wrote:

I have a data table whose columns are arranged in the following manner, from
left to right:

Date | ArriveTime | LeaveTime |Hours | Overtime | Regular | Gross |
RunningGross | CumHours | $/Week

What I'm looking to do is sum the "Gross" column based on a period of dates,
say 8/1/06 through 8/31/06, and not select this range manually.

The Date column is column D and the Gross column is column J.

Ideas?
--
Brevity is the soul of wit.

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,574
Default summing values in a data table based on criteria in another co

Wow, that's great, thanks.

I ended up using the following:
=SUMPRODUCT(--(D13:D166=DATE(2006,7,1)),--(D13:D166<=DATE(2006,7,31)),(J13:J166))

Thanks.

Dave
--
Brevity is the soul of wit.


"Toppers" wrote:


=SUMPRODUCT(--(D2:D100=StartDate),--(D2:D100<=End date),(J2:J100))

where start/End dates are cells containing these values.

If you want to sum a calendar month e.g August:

=SUMPRODUCT(--(MONTH(D2:D100)=8),J2:J100)

HTH

"Dave F" wrote:

I have a data table whose columns are arranged in the following manner, from
left to right:

Date | ArriveTime | LeaveTime |Hours | Overtime | Regular | Gross |
RunningGross | CumHours | $/Week

What I'm looking to do is sum the "Gross" column based on a period of dates,
say 8/1/06 through 8/31/06, and not select this range manually.

The Date column is column D and the Gross column is column J.

Ideas?
--
Brevity is the soul of wit.

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 634
Default summing values in a data table based on criteria in another co

A better option might be to those dates into 2 cells and then just reference
the cells instead of hardcoding them into the formula like that. It's then
obvious at a glance as to what thye parameters of the query are.

--
Regards
Ken....................... Microsoft MVP - Excel
Sys Spec - Win XP Pro / XL 97/00/02/03

------------------------------*------------------------------*----------------
It's easier to beg forgiveness than ask permission :-)
------------------------------*------------------------------*----------------



"Dave F" wrote in message
...
Wow, that's great, thanks.

I ended up using the following:
=SUMPRODUCT(--(D13:D166=DATE(2006,7,1)),--(D13:D166<=DATE(2006,7,31)),(J13:J166))

Thanks.

Dave
--
Brevity is the soul of wit.


"Toppers" wrote:


=SUMPRODUCT(--(D2:D100=StartDate),--(D2:D100<=End date),(J2:J100))

where start/End dates are cells containing these values.

If you want to sum a calendar month e.g August:

=SUMPRODUCT(--(MONTH(D2:D100)=8),J2:J100)

HTH

"Dave F" wrote:

I have a data table whose columns are arranged in the following manner,
from
left to right:

Date | ArriveTime | LeaveTime |Hours | Overtime | Regular | Gross |
RunningGross | CumHours | $/Week

What I'm looking to do is sum the "Gross" column based on a period of
dates,
say 8/1/06 through 8/31/06, and not select this range manually.

The Date column is column D and the Gross column is column J.

Ideas?
--
Brevity is the soul of wit.





  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,574
Default summing values in a data table based on criteria in another co

Well those values are hard-coded, in the Dates column, however, when I enter
the dates in that manner I get a #VALUE! error. When I use the
DATE(2006,7,1) function I don't.
--
Brevity is the soul of wit.


"Ken Wright" wrote:

A better option might be to those dates into 2 cells and then just reference
the cells instead of hardcoding them into the formula like that. It's then
obvious at a glance as to what thye parameters of the query are.

--
Regards
Ken....................... Microsoft MVP - Excel
Sys Spec - Win XP Pro / XL 97/00/02/03

------------------------------Â*------------------------------Â*----------------
It's easier to beg forgiveness than ask permission :-)
------------------------------Â*------------------------------Â*----------------



"Dave F" wrote in message
...
Wow, that's great, thanks.

I ended up using the following:
=SUMPRODUCT(--(D13:D166=DATE(2006,7,1)),--(D13:D166<=DATE(2006,7,31)),(J13:J166))

Thanks.

Dave
--
Brevity is the soul of wit.


"Toppers" wrote:


=SUMPRODUCT(--(D2:D100=StartDate),--(D2:D100<=End date),(J2:J100))

where start/End dates are cells containing these values.

If you want to sum a calendar month e.g August:

=SUMPRODUCT(--(MONTH(D2:D100)=8),J2:J100)

HTH

"Dave F" wrote:

I have a data table whose columns are arranged in the following manner,
from
left to right:

Date | ArriveTime | LeaveTime |Hours | Overtime | Regular | Gross |
RunningGross | CumHours | $/Week

What I'm looking to do is sum the "Gross" column based on a period of
dates,
say 8/1/06 through 8/31/06, and not select this range manually.

The Date column is column D and the Gross column is column J.

Ideas?
--
Brevity is the soul of wit.




  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 634
Default summing values in a data table based on criteria in another co

The following will work fine as long as the dates in Z1 and Z2 are real
dates:-

=SUMPRODUCT(--(D13:D166=$Z$1),--(D13:D166<=$Z$2),(J13:J166))

Regards
Ken........................


"Dave F" wrote in message
...
Well those values are hard-coded, in the Dates column, however, when I
enter
the dates in that manner I get a #VALUE! error. When I use the
DATE(2006,7,1) function I don't.
--
Brevity is the soul of wit.


"Ken Wright" wrote:

A better option might be to those dates into 2 cells and then just
reference
the cells instead of hardcoding them into the formula like that. It's
then
obvious at a glance as to what thye parameters of the query are.

--
Regards
Ken....................... Microsoft MVP - Excel
Sys Spec - Win XP Pro / XL 97/00/02/03

------------------------------*------------------------------*----------------
It's easier to beg forgiveness than ask permission :-)
------------------------------*------------------------------*----------------



"Dave F" wrote in message
...
Wow, that's great, thanks.

I ended up using the following:
=SUMPRODUCT(--(D13:D166=DATE(2006,7,1)),--(D13:D166<=DATE(2006,7,31)),(J13:J166))

Thanks.

Dave
--
Brevity is the soul of wit.


"Toppers" wrote:


=SUMPRODUCT(--(D2:D100=StartDate),--(D2:D100<=End date),(J2:J100))

where start/End dates are cells containing these values.

If you want to sum a calendar month e.g August:

=SUMPRODUCT(--(MONTH(D2:D100)=8),J2:J100)

HTH

"Dave F" wrote:

I have a data table whose columns are arranged in the following
manner,
from
left to right:

Date | ArriveTime | LeaveTime |Hours | Overtime | Regular | Gross |
RunningGross | CumHours | $/Week

What I'm looking to do is sum the "Gross" column based on a period
of
dates,
say 8/1/06 through 8/31/06, and not select this range manually.

The Date column is column D and the Gross column is column J.

Ideas?
--
Brevity is the soul of wit.






  #8   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,574
Default summing values in a data table based on criteria in another co

Thanks, will try it.
--
Brevity is the soul of wit.


"Ken Wright" wrote:

The following will work fine as long as the dates in Z1 and Z2 are real
dates:-

=SUMPRODUCT(--(D13:D166=$Z$1),--(D13:D166<=$Z$2),(J13:J166))

Regards
Ken........................


"Dave F" wrote in message
...
Well those values are hard-coded, in the Dates column, however, when I
enter
the dates in that manner I get a #VALUE! error. When I use the
DATE(2006,7,1) function I don't.
--
Brevity is the soul of wit.


"Ken Wright" wrote:

A better option might be to those dates into 2 cells and then just
reference
the cells instead of hardcoding them into the formula like that. It's
then
obvious at a glance as to what thye parameters of the query are.

--
Regards
Ken....................... Microsoft MVP - Excel
Sys Spec - Win XP Pro / XL 97/00/02/03

------------------------------Â*------------------------------Â*----------------
It's easier to beg forgiveness than ask permission :-)
------------------------------Â*------------------------------Â*----------------



"Dave F" wrote in message
...
Wow, that's great, thanks.

I ended up using the following:
=SUMPRODUCT(--(D13:D166=DATE(2006,7,1)),--(D13:D166<=DATE(2006,7,31)),(J13:J166))

Thanks.

Dave
--
Brevity is the soul of wit.


"Toppers" wrote:


=SUMPRODUCT(--(D2:D100=StartDate),--(D2:D100<=End date),(J2:J100))

where start/End dates are cells containing these values.

If you want to sum a calendar month e.g August:

=SUMPRODUCT(--(MONTH(D2:D100)=8),J2:J100)

HTH

"Dave F" wrote:

I have a data table whose columns are arranged in the following
manner,
from
left to right:

Date | ArriveTime | LeaveTime |Hours | Overtime | Regular | Gross |
RunningGross | CumHours | $/Week

What I'm looking to do is sum the "Gross" column based on a period
of
dates,
say 8/1/06 through 8/31/06, and not select this range manually.

The Date column is column D and the Gross column is column J.

Ideas?
--
Brevity is the soul of wit.






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
Return SEARCHED Column Number of Numeric Label and Value Sam via OfficeKB.com Excel Worksheet Functions 23 January 30th 06 06:16 PM
Need to Improve Code Copying/Pasting Between Workbooks David Excel Discussion (Misc queries) 1 January 6th 06 03:56 AM
Create Charts based on data in Table MAttenborough Charts and Charting in Excel 1 September 12th 05 12:00 AM
Counting & Summing based on criteria on another column Chicago D Excel Discussion (Misc queries) 2 August 25th 05 06:58 PM
Lookup Table Dilemma Karen Excel Worksheet Functions 2 June 10th 05 08:22 PM


All times are GMT +1. The time now is 03:00 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"