calcualte the avarage every 9 cell

AmandaSS

Board Regular
Joined
Jan 7, 2014
Messages
133
Hallo everybody,

I have a row with 9 (different) variables repeating 365 times. I have to calculate the avarage of each variable, over 365 times.

the example is for an hypotetical case of a row with 3 different variables repeating 365 times.
I have
A1
B1
C1
D1
E1
F1
G1
H1
I1
L1
M1
N1
1
prod
levelpriceprodlevelprice
prodlevel
price
avarage prod
avarage level
avarage price
2
p1
l1pr1
...
...
...
p365
l365
pr 365
avarage(price1, ..., price365)
avarage(level1, ..., level365)
avarage(pr1, ..., pr365)

<tbody>
</tbody>

I hope it's clear enough.
Thanks a lot as usual:)

Amanda
 
If you are unable to adapt the solution, designed for a sample you posted, to your real data, you should perhaps reconsider posting another more convenient sample directly on the board, which is representative of your data.

Yes, ok. I hope I make myself understand.
A:G is what I have, H:N is what I want. I will have to repeat the logic in H:N also for ROSN and no-cong in the following 2 sets of 5 cells.
Thanks,
Amanda

ABCDEFG(H)
SICI
(I)
SICI
(L)
SICI
(M) SICI(N)
SICI
1hours of the daySICIROSNno congestion
SICIROSNno congestion
CcgtOlioTgFerno congestion
21Ccgt00Ccgt00COUNT "Ccgt" in B2,E2COUNT "Oil" in B2,E2COUNT "Tg" in B2,E2COUNT "Fer" in B2,E2COUNT "no congestion" in B2,E2
32Ccgt00Ccgt00
43Ccgt00Ccgt0020000
54Ccgt00Ccgt00
65Ccgt00Ccgt00
76Ccgt00Ccgt00
87Ccgt00Ccgt00
98Ccgt00Ccgt00
109Ccgt00Ccgt00
111000no congestion00no congestion
121100no congestionCcgt00
1312Ccgt00Ccgt00
1413Ccgt00Ccgt00
1514Ccgt00Ccgt00
161500no congestionCcgt00
1716Ccgt00Fer00
1817Ccgt00Ccgt00
1918Olio00Olio00
2019Olio00Olio00
2120Tg00Tg0000200
2221Fer00Olio0001010
2322Olio00Olio0002000
2423Olio00Olio00
2524Ccgt00Olio00

<tbody>
</tbody>
 
Last edited:
Upvote 0

Excel Facts

Which Excel functions can ignore hidden rows?
The SUBTOTAL and AGGREGATE functions ignore hidden rows. AGGREGATE can also exclude error cells and more.
Yes, ok. I hope I make myself understand.
A:G is what I have, H:N is what I want. I will have to repeat the logic in H:N also for ROSN and no-cong in the following 2 sets of 5 cells.
Thanks,
Amanda
...

H1 shows Ccgt if I understand the posted exhibit. If so:

H2, copied down:

=COUNTIF(B2:E2,$H$1)

Is this what you are after?
 
Upvote 0
H1 shows Ccgt if I understand the posted exhibit. If so:

H2, copied down:

=COUNTIF(B2:E2,$H$1)

Is this what you are after?


thanks, but this formula doesnt really work.

In H2 I want to count how many times I have Ccgt in correspondence with SICI.
In I2 I want to count how many times I have Olio in correspondance with SICI. And so on for Tg Fer and no-congestion (in correspondence with SICI).

Btw, I was considering to re-organise my data set in a way that it's easier to get the result I am looking for. And avoid to formulate too complicated calculation.
Thanks
 
Upvote 0
thanks, but this formula doesnt really work.

In H2 I want to count how many times I have Ccgt in correspondence with SICI.
In I2 I want to count how many times I have Olio in correspondance with SICI. And so on for Tg Fer and no-congestion (in correspondence with SICI).

Btw, I was considering to re-organise my data set in a way that it's easier to get the result I am looking for. And avoid to formulate too complicated calculation.
Thanks

When you post a sample, try to post one that shows what a suggested formula has to consider, along with the expected counts. The current sample has two ccgt's in B2:E2 and that's what the suggested formula calculates. SICI doesn't affect this calculation... I don't see why you dismissed an earlier suggestion which used the SICI condition explicitly.
 
Upvote 0
yes, it's true I am back to this code here
=SUM(IF(ISNUMBER(SEARCH(E$1,$A$2:$D$2)),IF($A3:$D3=E$2,1)))

which has a reference to SICI.

Otherwise I will simplify the data set and then implement formulas. this is also a smart approach ;)
thanks !
</pre>

</pre>
 
Upvote 0
Hi All,

I am back to this treat because I need something similar to the previous formulas,

I have a row of heading (2 headings repeated a number of times) and columns of figures.
I need to calculate how many times "text" appears for each heading.

what I have
what I want
(A1) Heading 1
(B1) heading 2
(C1) heading 1
(D1) heading 2
....
text1
text2
text3
text4
text 1
text3
text3
text4
1
0
2
4
text4
text3
text4
text4
0
0
1
3
text2
text1
text2
text4
1
2
0
1
text1
text2
text1
text4
2
1
0
1

<tbody>
</tbody>

Thanks
Amanda
 
Upvote 0
Let K:N house what you want with K1:N1 listing text1, text2, etc.

K2, copied across and down

=COUNTIF($A2:$D2,K$1)
 
Upvote 0
what I have
what I want
heading 1
heading 2
(A1) Heading 1(B1) heading 2(C1) heading 1(D1) heading 2text1text2text3text4
text1
text2
text3
text4
text 1
text3text3text41
0
1
0
0
0
1
1
text4text3text4text40
0
0
2
0
0
1
1
text2text1text2text40
2
0
0
1
0
0
1
text1text2text1text42
0
0
0
0
1
0
1

<tbody>
</tbody>

Hi Aladin,

what I wrote above is actually what I needed. Sorry I was not enough accurate in my explanation.
Amanda
 
Upvote 0

Forum statistics

Threads
1,215,214
Messages
6,123,665
Members
449,114
Latest member
aides

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