Formula Help - average of the sum of cells in a row if another row in the column meets criteria
Hi, I was hoping someone could help me write a formula? I am trying to write a formula in the cell highlighted in yellow that takes an average of the sum of the cells highlighted in green if the country in row 3 in the same column is set to CANADA.
Is there a way to combine a (INDEX) statement with an AVERAGE IF formula?
Answers
-
Hi @Tara Factor
Assuming there will be more columns like the Brentwood Cost/per sq ft" and the 300 Main Cost / sq ft," I added a helper row, 0 Cost Type.
Using the Cost Type and Country information, we can get the average with the following formula;
=AVG(COLLECT(Brentwood@row:[500 Park / sq ft]@row, Brentwood$1:[500 Park / sq ft]$1, "per sq ft", Brentwood$4:[500 Park / sq ft]$4, "CANADA"))
We use the COLLECT function as we do not have the AVGIFS function. Please note that this is a cell formula as we reference ranges like "Brentwood$1:[500 Park / sq ft]$1."
The darker shaded area is the one I added to your sample sheet.
(Link to publised demo sheet)
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Smartsheet Customer Resources
- 64.3K Get Help
- 419 Global Discussions
- 221 Industry Talk
- 461 Announcements
- 4.8K Ideas & Feature Requests
- 143 Brandfolder
- 142 Just for fun
- 58 Community Job Board
- 462 Show & Tell
- 32 Member Spotlight
- 1 SmartStories
- 300 Events
- 39 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!