Google-sheets – Google Sheets – If cell contains text that matches text from a column, return another cell

google sheetsvlookup

https://docs.google.com/spreadsheets/d/1GG7ekrD6CxxpowrRDm9DMvv3xHdvtAa8MHYCk4gI4D4/copy

1) If D10 (or I10 or N10) matches an exercise from the corresponding column to the right, return another cell (such as D21 or I21 or N21) to get the sum of the volume for each category of exercise.
2) in the Main+Axx Avg %, do the same as 1) but give me the average of those %s – might need a countif match to determine the denominator and divide the sum of the % by that.

Currently getting false matches that should not be happening, cannot seem to figure out why.

The idea is that I can add to the list columns in the future as i add different accessory movements/exercises within each category.

Best Answer

=arrayformula(sum(if(D10=AB11:AB21,D21,0),if(I10=AB11:AB21,I21,0),if(N10=AB11:AB21,N21,0)))

Found the solution myself! I do not 100% understand how arrayformula works - but I got it to work how i needed it to so ill take it. Hopefully this helps if someone else is looking for something similar!