conditional formula to recognize day of the week from date

G

Guest

Hi, please someone help me!
I have a colums with dates, all are consecutive days. I formatted it to
display the days of the week and date ( Tuesday, April 19, 2005) I have
another column where I want to calculate weekly average from the first day of
the week, sunday, to the last saturday. So in this column I want to write a
conditional formula that if the date column in the same row is saturday then
calculate the average for seven days above including saturday if not the
display a blank. I'm trying to use =if( ) function but I don't know hor to
tell the program to recognize if the date is saturday. Please help me. Thank
you
Thalia
 
P

PCLIVE

You could try something along this line.

=IF(WEEKDAY(A1)=7,"Your average formula","")

In the example, A1 is where your date is.

HTH,
Paul
 
B

Bob Phillips

=IF(WEEKDAY(A20,1)=7,SUM(B20:OFFSET(B20,-6,0)),"")

but what happens if the Saturday date doesn't have 6 days above?

--

HTH

RP
(remove nothere from the email address if mailing direct)
 
B

Bob Phillips

oh and replace SUM with AVERAGE

--

HTH

RP
(remove nothere from the email address if mailing direct)
 

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