Find average of every other row of a column

mv8167

Board Regular
Joined
Apr 27, 2005
Messages
103
I have the following code that adds up a column and divides the total by the count found that are found to have valid values:

=SUMIF(L1:L10,"<>""")/COUNT(L1:L10)

I need my code to look at every other row. If a value exists, then add to the sum, plus add one to the count to fgind the average.

There are 10 values in one column, for rows 2, 4, 6, 8 and 10 if a value exists, sum qand add 1 to the count.

Is this possible? Thx

Lorena
 

Excel Facts

What is the shortcut key for Format Selection?
Ctrl+1 (the number one) will open the Format dialog for whatever is selected.
Hi:)

Can you try this one.
Excel Workbook
KL
1100
2200
3300
4400
5500
6600
7700
8800
9900
101000
11Average600
Sheet15
Excel 2010
#VALUE!
Entered with Ctrl+Shift+Enter. If entered correctly, Excel will surround with curly braces {}.
 
Upvote 0
Thx Mr Villareal

I tried this buit I get 0.0 as my answer.;

My column is as such:

1:00
1:30
1:05


1:05
1:05

0:35
0:40

I need to add (1:30+1:05+0:40)/3 = 1:05


Go Manny Paccio! Go Philippines
 
Upvote 0
Try this its a knockout punch.LOL.:)
Excel Workbook
KL
11:00
21:30
31:05
4
5
61:05
71:05
8
90:35
100:40
11Average1:05
Sheet15
Excel 2010
#VALUE!
Entered with Ctrl+Shift+Enter. If entered correctly, Excel will surround with curly braces {}.
 
Upvote 0
If there are empty or text-valued cells in-between, an ISNUMBER test is more appropriate...

Control+shift+enter, not just enter:

=AVERAGE(IF(MOD(ROW($L$1:$L$10)-ROW($L$1)+1,2)=0,IF(ISNUMBER($L$1:$L$10),$L$1:$L$10)))
 
Upvote 0
Ok, I did it once and the code worked.

I am lost on why I need to Cftrl-Shift-Enter? I then try it again it does not work? Within Excel, I copy/paste your code with no luck also.

Is this av spercial code that only works one time, lol ;-)
 
Upvote 0
Aladin,

Thx also for your time.

Ive never used Cntrl-Shift-Enter before. Do I Cntrl-C first, then Cntrl-Shift-Enter into the cell or command line (fx)? I did this once but know my Cntrl-Shift-Enter dose not seem to work. lol
 
Upvote 0
Aladin,

Thx also for your time.

Ive never used Cntrl-Shift-Enter before. Do I Cntrl-C first, then Cntrl-Shift-Enter into the cell or command line (fx)? I did this once but know my Cntrl-Shift-Enter dose not seem to work. lol

The combined use of the control+shift+enter keys signal Excel that it must treat the formula as one that operates on arrays. See the Help file on "arrays".

Steps:

1) Type or copy the formula to the relevant cell.

2) While still in the cell, press down the control and shift keys together and hit the enter key at the same time.

If done properly, the formula is surrounded by a pair of { and } by Excel itself.

3) Copy down the formula using AutoFill.
 
Upvote 0

Forum statistics

Threads
1,224,506
Messages
6,179,159
Members
452,892
Latest member
yadavagiri

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