Average data in multiple columns based on column header, row criteria and value

devious66

New Member
Joined
Jul 19, 2018
Messages
2
I need help getting an average of column data. I only want to average values which are greater than zero (or not blank), based on column header data, and row criteria. Here is an example of what I need.

WEEK1 WEEK2 WEEK3 WEEK4
ITEMA 50 0 30 50
ITEMB 100 125 125 50
ITEMC 0 0 40 30


So if I wanted average data for ITEMA, only for weeks 2-4, and only if greater than zero, the result would be 40.

Thanks so much for anyone who can help.

devious66
 

Excel Facts

How to show all formulas in Excel?
Press Ctrl+` to show all formulas. Press it again to toggle back to numbers. The grave accent is often under the tilde on US keyboards.
A
B
C
D
E
F
G
1
WEEK1WEEK2WEEK3WEEK4average
2
ITEMA
50​
0​
30​
50​
40​
3
ITEMB
100​
125​
125​
50​
4
ITEMC
0​
0​
40​
30​

<tbody>
</tbody>



G2=AVERAGE(IF(A2:A4=A2,IF(RIGHT(B1:E1,1)+0>=2,IF(RIGHT(B1:E1,1)+0<=4,IF(B2:E4<>0,B2:E4))))) control+shift+enter
 
Upvote 0
Marzio,

Thanks for your reply, and I apologize. My first time posting here, and I realize I needed to be much more specific. The "week" columns will actually be week ending dates, and I want to average the data in a specific date range (out of 52 week columns), but only where the entries within that range are greater than zero.

Sorry for the effort you put into your answer. I will try to be better in later posts!

Thanks,

Devious66
 
Upvote 0

Forum statistics

Threads
1,214,402
Messages
6,119,301
Members
448,885
Latest member
LokiSonic

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