I'm trying to create an excel spreadsheet in which I can selected a meal that I'll eat (with Y), which will sum certain macronutrient values for all selected meals.
In particular, for the first three rows, my formula will look like this:
=IF(F3="Y",E3,0)+IF(F4="Y",E4,0)+IF(F5="Y",E5,0)
Is there a way I can extend this to check through 20, 50, 100 or more rows without typing out the IF statement for each row?
Thanks!