Take the group average - excel

I've two columns: A and B; for each 3 rows in A column, I want to take the average of that 3 rows and write to B. here is the example:
A B
10 20
20 50
30
40
50
60
I need the excel formula of this calculation. Thanks in advance

Suppose your data in column A are in range A1:A100, then use following formula, say in B1:
=AVERAGE(INDEX($A$1:$A$100,3*(ROW()-ROW($B$1))+1):INDEX($A$1:$A$100,3*(ROW()-ROW($B$1)+1)))
and drag it down

Related

How to write a multiple criteria index-match that averages all occurrences of results

I am trying to find the average of all occurrences in column C based on an index-match search of column A and B.
Here is the example data:
A B C
1 10 85
1 10 80
2 20 83
2 20 75
Currently, my function is this
=AVERAGE(INDEX(C2:C5,MATCH(1&10,A2:A5&B2:B5,0)))
This produces the value 85. I would like to take the average of both 85 and 80.
Thank you!
Looks like typically a case for AVERAGEIFS(), average a specific column with certain criteria in other columns e.g. your 1 in column A and 10 in column B.
So try:
=AVERAGEIFS(C1:C5,A1:A5,1,B1:B5,10)

Combining Data from two columns in excel, alternate rows

I have two columns A and B
**A**
30
40
50
60
70
**B**
90
80
10
20
I am struggling to find a formula that will allow me to combine the two columns by taking first value of column A followed by two values of column B and so on:
Combined Column "C" Example:
**C**
30
90
80
40
10
20
and so on.
What can I do? Thanks
If your data starts from row 1, you can type the following formula in column C:
=IF(MOD(ROW(),3)=1,INDIRECT("A"&TEXT(ROUNDUP(ROW()/3,0),"0")),IF(MOD(ROW(),3)=2,INDIRECT("B"&TEXT(ROUNDUP(ROW()/3,0)*2-1,"0")),INDIRECT("B"&TEXT(ROUNDUP(ROW()/3,0)*2,"0"))))
If the data starts from row 2, then the formula is:
=IF(MOD(ROW(),3)=2,INDIRECT("A"&TEXT(ROUNDUP(ROW()/3,0)+1,"0")),IF(MOD(ROW(),3)=0,INDIRECT("B"&TEXT(ROUNDUP(ROW()/3,0)*2,"0")),INDIRECT("B"&TEXT(ROUNDUP(ROW()/3,0)*2-1,"0"))))

Count duplicates and display order of occurence

I am attempting to count the number of occurrences of each value within a column and then output the order in which it was found (top to bottom) with unsorted data. I have been unable to find a suitable formula to accomplish this task. Any assistance is greatly appreciated.
Example:
Number DuplicateIndex
50 1
20 1
30 1
10 1
30 2
40 1
30 3
50 2
Try,
=countif(A$2:A2, A2)
, in B2 and fill down.
Try,
In B2 and fill down
=unique(A2:A9)
In C2 and fill down
=countif(A$2:A9, B2)

Excel countif(s) multiples

I'm trying to calculate the count of multiple occurrences of a figure using countif.
I have the range set but I need a calculation which can count in multiples of 50 without me having to type thousands of versions of countif (=COUNTIF(B2:B5,">=50")-COUNTIF(B2:B5,">100" etc.).
Data Count
50 1
70 1
80 1
10 0
150 3
This data should show 6 but at the moment I'm getting 4.
First you can start by making bins. you can make it with Data analysis tool or half manual
Like in the example, on A2 enter 0 and on b2 enter =a2+50
Same goes for a3 enter =b2 and last on a4 =a3+50
Now you can drag it down as much as you like.
Instaed of using countif use sumif finction. let's assume your data is on cloumn H and the values you want to sum are in column I, then on c2 enter
=SUMIFS(I:I,H:H,">"&A2,H:H,"<="&B2)
you can drag it down as much as you like.
Simply use Excels ROUNDDOWN function:
e.g. for B2: =ROUNDDOWN(A2/50,0)

I WANT CALCULATE SUM IN EXCEL

I HAVE A QUESTION ABOUT SUM IN EXCEL:
I have many rows in excel.
I want to calculate sum of each row in one formula
for example
A B C D E
2 3 5 6 8 24
4 5 6 8 9 32
BUT do not USE separate formula FOR EVER CALCULATION (FOR EXAMPLE =sum A1:D1)
CAN I USE WITH ONE FORMULA TO CALCULATE SUM OF EVERY ROWS
You do not have to manually enter the formula to calculate sum of every row.
In the first row you would input =SUM(A1:D1) (did you mean to include E1 as well?)
Then follow the instructions here to apply it the other rows

Resources