Formula question re week days

GMD1975

Board Regular
Joined
Sep 16, 2011
Messages
112
Office Version
  1. 365
Hi,

Using the below as an example: I want to calculate the average number of row 2 but only where the date in row 1 is a week day (mon/fri)... Can anyone help please?

Kind Regards
Gerard


A</SPAN>B</SPAN>C</SPAN>D</SPAN>E</SPAN>F</SPAN>G</SPAN>H</SPAN>I</SPAN>J</SPAN>K</SPAN>L</SPAN>M</SPAN>N</SPAN>O</SPAN>P</SPAN>Q</SPAN>R</SPAN>S</SPAN>
1</SPAN>01-Sep</SPAN>02-Sep</SPAN>03-Sep</SPAN>04-Sep</SPAN>05-Sep</SPAN>07-Sep</SPAN>08-Sep</SPAN>09-Sep</SPAN>10-Sep</SPAN>11-Sep</SPAN>12-Sep</SPAN>13-Sep</SPAN>14-Sep</SPAN>15-Sep</SPAN>16-Sep</SPAN>17-Sep</SPAN>18-Sep</SPAN>19-Sep</SPAN>20-Sep</SPAN>
2</SPAN>1</SPAN>1</SPAN>108</SPAN>107</SPAN>90</SPAN>87</SPAN>3</SPAN>2</SPAN>113</SPAN>135</SPAN>80</SPAN>81</SPAN>60</SPAN>0</SPAN>3</SPAN>114</SPAN>100</SPAN>104</SPAN>87</SPAN>

<TBODY>
</TBODY><COLGROUP><COL><COL><COL><COL span=2><COL span=4><COL span=2><COL span=5><COL span=3><COL></COLGROUP>
 

Excel Facts

What does custom number format of ;;; mean?
Three semi-colons will hide the value in the cell. Although most people use white font instead.
Hi Gerard,

Does this do what you require?...

Excel Workbook
ABCDEFGHIJKLMNOPQRSTU
101-Sep02-Sep03-Sep04-Sep05-Sep07-Sep08-Sep09-Sep10-Sep11-Sep12-Sep13-Sep14-Sep15-Sep16-Sep17-Sep18-Sep19-Sep20-Sep
2111081079087321131358081600311410010487
3
4Average80.357142861Sun
5Total11252Mon
6Count143Tue
74Wed
8Check80.357142865Thu
96Fri
107Sat
11
Sheet7


You may need to change the 2 and 6 to 1 and 5.
I hope that helps.

Ak
 
Upvote 0
Hi, Many thanks, thats spot on :)

Hi Gerard,

Does this do what you require?...

Sheet7

ABCDEFGHIJKLMNOPQRSTU
101-Sep02-Sep03-Sep04-Sep05-Sep07-Sep08-Sep09-Sep10-Sep11-Sep12-Sep13-Sep14-Sep15-Sep16-Sep17-Sep18-Sep19-Sep20-Sep
2111081079087321131358081600311410010487
3
4Average80.35714286 1Sun
5Total1125 2Mon
6Count14 3Tue
7 4Wed
8Check80.35714286 5Thu
9 6Fri
10 7Sat
11

<COLGROUP><COL style="FONT-WEIGHT: bold; WIDTH: 30px"><COL style="WIDTH: 58px"><COL style="WIDTH: 84px"><COL style="WIDTH: 49px"><COL style="WIDTH: 49px"><COL style="WIDTH: 49px"><COL style="WIDTH: 49px"><COL style="WIDTH: 49px"><COL style="WIDTH: 49px"><COL style="WIDTH: 49px"><COL style="WIDTH: 49px"><COL style="WIDTH: 49px"><COL style="WIDTH: 49px"><COL style="WIDTH: 49px"><COL style="WIDTH: 49px"><COL style="WIDTH: 49px"><COL style="WIDTH: 49px"><COL style="WIDTH: 49px"><COL style="WIDTH: 49px"><COL style="WIDTH: 49px"><COL style="WIDTH: 30px"><COL style="WIDTH: 36px"></COLGROUP><TBODY>
</TBODY>

Spreadsheet Formulas
CellFormula
B4=SUMPRODUCT(--(WEEKDAY($A$1:$S$1)>=2)*(WEEKDAY($A$1:$S$1)<=6)*$A$2:$S$2)/SUMPRODUCT(--(WEEKDAY($A$1:$S$1)>=2)*(WEEKDAY($A$1:$S$1)<=6)*1)
B5=SUMPRODUCT(--(WEEKDAY($A$1:$S$1)>=2)*(WEEKDAY($A$1:$S$1)<=6)*$A$2:$S$2)
B6=SUMPRODUCT(--(WEEKDAY($A$1:$S$1)>=2)*(WEEKDAY($A$1:$S$1)<=6))
B8=B5/B6

<TBODY>
</TBODY>

<TBODY>
</TBODY>


Excel tables to the web >> Excel Jeanie HTML 4

You may need to change the 2 and 6 to 1 and 5.
I hope that helps.

Ak
 
Upvote 0

Forum statistics

Threads
1,203,524
Messages
6,055,904
Members
444,832
Latest member
bgunnett8

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top