Looping through rows in excel

时间:2016-04-04 18:22:04

标签: excel

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!

0 个答案:

没有答案