Adding Days

T

Toast

Column A has dates, and column B has sales figures for the respective dates.

I'm trying to use =SUMIF to add together all the "Mondays" and the rest of
the days of the week, and =COUNTIF to count the number of "Mondays" so that I
can get a value that tells me how much each day's average is approximately.
I've gotten this far, then got stuck because I have no idea what to do:

=SUMIF(A2:A200,"Monday",B2:B200)

Your help's appreciated ahead of time :)
 
R

Rick Rothstein

Is this what you are looking for?

=SUMIF(A2:A200,"Monday",B2:B200)/COUNTIF(A2:A200,"Monday")
 
T

T. Valko

If your dates are true Excel dates then:

=SUMIF(A2:A200,"Monday",B2:B200)

Won't work!

Try this array formula** :

=AVERAGE(IF(WEEKDAY(A2:A200,2)=n,B2:B200))

Where n is the number of the weekday of interest:

Monday = 1
Tuesday = 2
Wednesday = 3
...
Sunday = 7

n can be a cell reference that holds the weekday number:

D2 = 1 (for Monday)

=AVERAGE(IF(WEEKDAY(A2:A200,2)=D2,B2:B200))

** array formulas need to be entered using the key combination of
CTRL,SHIFT,ENTER (not just ENTER). Hold down both the CTRL key and the SHIFT
key then hit ENTER.
 

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