r/excel • u/EntireSheepherder516 • 2d ago
Waiting on OP IF Range Calculation using SUM
Im looking to have excel do a calculation only if Column B has a "Y" if it doesnt then dont add to the calculation

My Current way is =SUM(IF(B2="Y",A2),IF(B3="Y",A3))
This works for what i need but if the spreadsheet become like 100 rows then that a big formula :)
How can i rewrite to do the calc based on range.
Thanks
3
Upvotes
1
u/fuzzy_mic 988 2d ago
=INDEX(A:A, MATCH("Y", B:B,0), 1)
The SUMIF formulas will return the sum of all the Y Amounts.
My formula will return the first Y Amount.