Hi there, feel like there might be a simple way to do this, but I'm stumped. I'm looking for a way to have a sumifs criteria range tie to a reference rather than be static. Here's an example table (image attached as well, just in case), and my problem outlined below:
Thanks for your help!
Desired Outcome:
Create three sums of column A data, one for each year, summing only those data points that are greater than zero in the respective year
For example, 2022 should be A5+A6+A8, for a total of 19,482
Problem:
I want the formula to search within cols B-D and sum the correct year based on a reference, rather than me having to manually change the column in the formula
For example, for the 2022 total, I would want to replace the absolute reference in the below formula (B4:B8) with something dynamic
=SUMIFS(A4:A8,B4:B8,">"&0)
Also Tried:
Using IF(COUNTIF to look for a value within the range (eg 2022), but then I don't know how to tell it to do the sumifs only for the columns that contain that value
Thanks for your help!
Example Table: | |||
Sq. Ft. | 2022 | 2023 | 2024 |
85,783 | 0 | 8 | 11 |
5,837 | 6 | 0 | 7 |
6,070 | 21 | 44 | 0 |
261,674 | 0 | 5 | 17 |
7,575 | 98 | 12 | 3 |
Desired Outcome:
Create three sums of column A data, one for each year, summing only those data points that are greater than zero in the respective year
For example, 2022 should be A5+A6+A8, for a total of 19,482
Problem:
I want the formula to search within cols B-D and sum the correct year based on a reference, rather than me having to manually change the column in the formula
For example, for the 2022 total, I would want to replace the absolute reference in the below formula (B4:B8) with something dynamic
=SUMIFS(A4:A8,B4:B8,">"&0)
Also Tried:
Using IF(COUNTIF to look for a value within the range (eg 2022), but then I don't know how to tell it to do the sumifs only for the columns that contain that value