Date Question

G

Guest

I have an Excel SS that has a summary page that has several count if / sum if
values. Many of which refer to date ranges. today etc.

Is it possible for me to capture all data in a range of the last calander
month ie. if i all dates in October.

Currently i have the formulas written to count details within the last 31
days however i would like to make this a little more correct.

example :
=SUMPRODUCT((whoC="gn") * (typec="email " ) * (whenb<B1) * ( whenb >B2) )

B1 = Now()
B2 = B1 - 31

Any help very much appreciated
 
F

Frank Kabel

Hi
try:
B1:
=DATE(YEAR(NOW()),MONTH(NOW())-1,1)

B2:
=DATE(YEAR(NOW(),MONTH(NOW()),0)
 
M

Myrna Larson

In B1 put the starting date, i.e. 10/1/2004. In B2, manually enter the end
date, 10/31/2004, or use a formula like =DATE(YEAR(B1),MONTH(B1)+1,0) which
will generate the last day of that month, 10/31/2004, for you.

Then the formula is

=SUMPRODUCT((whoC="gn") * (typec="email " ) * (whenb>=B1) * ( whenb<=B2) )
 
G

Guest

Thanks Frank ,

I am having a little trouble with the second formula (b2)..

Any thoughts
 
G

Guest

Thanks Myrna ,

Very helpful

Myrna Larson said:
In B1 put the starting date, i.e. 10/1/2004. In B2, manually enter the end
date, 10/31/2004, or use a formula like =DATE(YEAR(B1),MONTH(B1)+1,0) which
will generate the last day of that month, 10/31/2004, for you.

Then the formula is

=SUMPRODUCT((whoC="gn") * (typec="email " ) * (whenb>=B1) * ( whenb<=B2) )
 
G

Guest

Thanks Frank,

I actually worked it out about 3 minutes after posting my reply.. my fault i
am a novice when it comes to date functions..

I don't suppose there is an easy way to work the same equasion out but for
last calander week ??

Again Thanks
 
M

Myrna Larson

Assuming the calendar week starts on Sunday, this formula starts with the
current date, backs up to the previous Saturday, then backs up another 6 days
to the Sunday before the previous Saturday. If the current date is a Saturday,
it will back up a total of 13 days.

=TODAY()-WEEKDAY(TODAY())-6

The end of that week is that date + 6.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top