Brain Dead Excel help

keepngoal

OKA: keepingoal
Staff member
Bookie
SuperFanatic
SuperFanatic T2
Jun 20, 2006
38,262
22,535
113
I am hoping to get some help in an area I am typically proficient in.

ColumnA | ColumnB
Date | Number

I need to look up date ranges (monthly and then quarterly) in ColumnA and sum the appropriate cell in ColumnB.

I am stuck in a sumif mode....

=sumif(A1:A24,">01/01/2009",B1:B24) gets me all that are greater than January 1st of this year. However I would like to have the formula look at the criteria for the first quarter from a list of dates in column A: >01/01/2009 AND <04/01/2009

this does NOT work or any variations thereof:
=sumif(A1:A24,">01/01/2009"AND "<04/01/2009",B1:B24)

Do I need an array formula?

Any help is appreciated.

-keep
 
  • Like
Reactions: chadm

tamjam

Active Member
Apr 18, 2008
806
71
28
Pants-free Avenue
Have an equation that is the total sum - sum before 01/01/09 - sum after 04/01/09. BAM

So the final equation would be....

sum(B1:B24) - sumif(A1:A24,"<01/01/09",B1:B24) - sumif(A1:A24,">04/01/09",B1:B24)
 
Last edited:
  • Like
Reactions: keepngoal

keepngoal

OKA: keepingoal
Staff member
Bookie
SuperFanatic
SuperFanatic T2
Jun 20, 2006
38,262
22,535
113
In one cell you could sumif the date is before 01/01/09 and in another cell sumif the date is after 04/09/09. Then in a third cell the have an question that is the total sum - sum before 01/01/09 - sum after 04/09/09. BAM

I guess I could do...

+sum(all dates)-sumif(>date)-sumif(<date)

kinda seems messy to me .... but it does work. Sometimes I look for the perfect tool (formula) for the task, taking longer to search than what the tasks requires with adequate tools. :no:

-keep
 

keepngoal

OKA: keepingoal
Staff member
Bookie
SuperFanatic
SuperFanatic T2
Jun 20, 2006
38,262
22,535
113
=SUMIFS(B1:B24,A1:A24,">01/01/2009",A1:A24,"<04/01/2009")

EDIT: This is only Excel 2007 or newer. If you have older, I can try to figure out another way.

Thanks... however 2003. :sad:
 

mred

Well-Known Member
Oct 19, 2006
8,968
5,364
113
SE WI
bball.notnothing.net
Got it.

=SUMPRODUCT((B1:B24),1*(A1:A24>VALUE("1/1/2009")),1*(A1:A24<VALUE("4/1/2009")))

The "1*" in the equation converts the arrays of booleans into arrays of 0,1 numbers.
 
Last edited:
  • Like
Reactions: keepngoal

keepngoal

OKA: keepingoal
Staff member
Bookie
SuperFanatic
SuperFanatic T2
Jun 20, 2006
38,262
22,535
113
Got it.

=SUMPRODUCT((B1:B24),1*(A1:A24>VALUE("1/1/2009")),1*(A1:A24<VALUE("4/1/2009")))

The "1*" in the equation converts the arrays of booleans into arrays of 0,1 numbers.

Sweet... that is it!!! Thanks mred!! Thank you!

-keep