#1   Report Post  
Arlen
 
Posts: n/a
Default Finding Friday

Okay, I have a spreadsheet. Cell A1 contains the month, Column B contains
all the weekdays of that month. Daily data is stored is Column C. I want to
do weekly totals of the data in Column C as well. However, if the user
inputs a different month in A1, the weekdays will all change, shift...etc.

Therefore, to total week 1, I need to locate the first instance of Friday in
Column B, and then add that to everything above it. Week 2 needs to find the
2nd instance of Friday and add everything from that Friday to the first
Friday...and so on.

How does one do this?

Thank you very much....

Arlen
  #2   Report Post  
Myrna Larson
 
Posts: n/a
Default

I assume that column B contains actual dates, not just the numbers 1-31 (you
can use the custom format "d" if you want to see only the day of the month).

You can put this formula in D2 and copy it down.


=IF(WEEKDAY(B2)<6,"",SUMIF(B$2:B2,"<="&B2,C$2:C2)-SUMIF(B$2:B2,"<="&B2-7,C$2:C2))

You'll see a total in the rows where the date is a Friday, otherwise empty
text.

Note that when the week begins on a date other than a Monday, the first total
is for less than 5 days.

I don't know how you plan to enter the weekdays for the given month in column
A. Assuming you have the Analysis Tool Pack installed is this formula in B2

=WORKDAY(DATEVALUE($A$1&" 1, 2005")-1,1)

and in B3 through B32

=IF(B2="","",IF(MONTH(WORKDAY(B2,1))=MONTH(B$2),WO RKDAY(B2,1),""))


On Sat, 22 Jan 2005 17:05:02 -0800, "Arlen"
wrote:

Okay, I have a spreadsheet. Cell A1 contains the month, Column B contains
all the weekdays of that month. Daily data is stored is Column C. I want to
do weekly totals of the data in Column C as well. However, if the user
inputs a different month in A1, the weekdays will all change, shift...etc.

Therefore, to total week 1, I need to locate the first instance of Friday in
Column B, and then add that to everything above it. Week 2 needs to find the
2nd instance of Friday and add everything from that Friday to the first
Friday...and so on.

How does one do this?

Thank you very much....

Arlen


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
Finding a linked cell will Links and Linking in Excel 1 January 17th 05 01:43 PM
finding the coordinates of the maximum point on a graph eastham85 Charts and Charting in Excel 2 January 16th 05 01:34 PM
How can i imput a formula in excel for finding the area of a regu. Rona Excel Discussion (Misc queries) 2 January 15th 05 08:17 PM
Finding Values in a "Matrix" Diane Alsing Excel Discussion (Misc queries) 8 December 31st 04 08:21 PM
Finding Numbers with Cells that also contain letters Adam Excel Discussion (Misc queries) 7 December 29th 04 02:41 PM


All times are GMT +1. The time now is 05:28 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"