Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8
Default match week, count rows, sum rows?

Hi,

I've been westling with this and making no progress.

I have columns Date, Subject, # figure. On another sheet I will have a
reference date which is a week ending date for each week.
I need to find all rows from the 1st sheet whose date falls in the same week
as my week ending reference date, count the number of rows found, and sum the
#figure for all rows found.

Example:
Reference date: = 5-Jan-07

A B
C
Date Subject #
Figure

1-Jan-07 abc 3
4-Feb-07 def 1
3-Jan-07 ghi 2
1-Jan-07 jkl 1


TIA,
Earl





  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,726
Default match week, count rows, sum rows?

Count the rows, assuming the reference date is in E1

=COUNTIF(Sheet1!A:A,""&E1-7)-COUNTIF(Sheet1!A:A,""&E1)

To sum them

=SUMIF(Sheet1!A:A,""&E1-7,Sheet1!C:C)-SUMIF(Sheet1!A:A,""&E1,Sheet1!C:C)

--
---
HTH

Bob

(change the xxxx to gmail if mailing direct)


"earls" wrote in message
...
Hi,

I've been westling with this and making no progress.

I have columns Date, Subject, # figure. On another sheet I will have a
reference date which is a week ending date for each week.
I need to find all rows from the 1st sheet whose date falls in the same
week
as my week ending reference date, count the number of rows found, and sum
the
#figure for all rows found.

Example:
Reference date: = 5-Jan-07

A B
C
Date Subject #
Figure

1-Jan-07 abc
3
4-Feb-07 def
1
3-Jan-07 ghi
2
1-Jan-07 jkl
1


TIA,
Earl







  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8
Default match week, count rows, sum rows?

Thanks Bob. This works as is... Earl

"Bob Phillips" wrote:

Count the rows, assuming the reference date is in E1

=COUNTIF(Sheet1!A:A,""&E1-7)-COUNTIF(Sheet1!A:A,""&E1)

To sum them

=SUMIF(Sheet1!A:A,""&E1-7,Sheet1!C:C)-SUMIF(Sheet1!A:A,""&E1,Sheet1!C:C)

--
---
HTH

Bob

(change the xxxx to gmail if mailing direct)


"earls" wrote in message
...
Hi,

I've been westling with this and making no progress.

I have columns Date, Subject, # figure. On another sheet I will have a
reference date which is a week ending date for each week.
I need to find all rows from the 1st sheet whose date falls in the same
week
as my week ending reference date, count the number of rows found, and sum
the
#figure for all rows found.

Example:
Reference date: = 5-Jan-07

A B
C
Date Subject #
Figure

1-Jan-07 abc
3
4-Feb-07 def
1
3-Jan-07 ghi
2
1-Jan-07 jkl
1


TIA,
Earl








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
Count rows and insert number to count them. Mex Excel Discussion (Misc queries) 6 August 23rd 06 02:29 AM
Count rows that match criteria in 2 different column cell ranges JoAnn New Users to Excel 2 December 9th 05 05:51 PM
Match Last Occurrence of Numeric Value and Count BACK to Previous Sam via OfficeKB.com Excel Worksheet Functions 4 November 24th 05 02:15 AM
Match Each Numeric occurrence and Return Individual Rows of Data Sam via OfficeKB.com Excel Worksheet Functions 4 October 13th 05 04:22 AM
Count rows based on multiple criteria Murph Excel Worksheet Functions 1 October 28th 04 07:13 AM


All times are GMT +1. The time now is 09:41 PM.

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"