![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Board Regular
Join Date: Feb 2002
Posts: 390
|
A1:A100 contents dates, B1:B100 values.
How can I sum the values of all Fridays? |
|
|
|
|
|
#2 |
|
MrExcel MVP
Join Date: Feb 2002
Location: Austin, Texas USA
Posts: 11,654
|
{=SUM((WEEKDAY(A1:A100)=6)*B1:B100)}
Note: This is an array formula which is entered using the Control+Shift+Enter key combination. For more on array formulas see the Excel Help Index topic for "About array formulas and how to enter them". [ This Message was edited by: Mark W. on 2002-04-24 15:21 ] |
|
|
|
|
|
#3 |
|
Board Regular
Join Date: Feb 2002
Posts: 390
|
Works like a charm.
Thank you very much for the quick response! |
|
|
|
|
|
#4 |
|
Board Regular
Join Date: Feb 2002
Posts: 390
|
I have another question yet.
How can I calculate how many Fridays there are in A1:A100? |
|
|
|
|
|
#5 | |
|
MrExcel MVP
Join Date: Feb 2002
Location: Austin, Texas USA
Posts: 11,654
|
Quote:
|
|
|
|
|
|
|
#6 |
|
Board Regular
Join Date: Feb 2002
Posts: 390
|
Thank you very much again!
|
|
|
|
|
|
#7 |
|
MrExcel MVP
Join Date: Feb 2002
Location: Austin, Texas USA
Posts: 11,654
|
Shall we go for the average Friday value...
{=AVERAGE(IF(WEEKDAY(A1:A100)=6,B1:B100))} |
|
|
|
|
|
#8 | |
|
MrExcel MVP
Join Date: Mar 2002
Location: Michigan USA
Posts: 11,452
|
Quote:
=SUM(IF(WEEKDAY(A1:A100)=6,1,0)) HTH
__________________
Regards! Yogi Anand, D.Eng, P.E. Energy Efficient Building Network LLC www.energyefficientbuild.com |
|
|
|
|
|
|
#9 |
|
MrExcel MVP
Join Date: Mar 2002
Location: Michigan USA
Posts: 11,452
|
Sorry, Mark ... I did not see your post till after I posted mine. Yours is shorter and more elegant.
Regards! Yogi Anand |
|
|
|
|
|
#10 | |
|
MrExcel MVP
Join Date: Feb 2002
Location: Austin, Texas USA
Posts: 11,654
|
Quote:
{=SUM(IF(WEEKDAY(A1:A100)=6,1))} |
|
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|