You are viewing limited content. For full access, please sign in.

Question

Question

SUM a row in table not working

asked on October 28, 2021 Show version history

I have a row to calculate total hours worked. I cannot get the formula to work. Is it because I have the PROJ. column that is a single line and not included in the formula. 

I am using formula 

=SUM(INDEX(Hours.1,ROW()),INDEX(Hours.2,ROW()),INDEX(Hours.3,ROW()),INDEX(Hours.4,ROW()),INDEX(Hours.5,ROW()),INDEX(Hours.6,ROW()),INDEX(Hours.7,ROW()),INDEX(Hours.8,ROW()),INDEX(Hours.9,ROW()),INDEX(Hours.10,ROW()),INDEX(Hours.11,ROW()),INDEX(Hours.12,ROW()),INDEX(Hours.13,ROW()),INDEX(Hours.14,ROW()),INDEX(Hours.15,ROW()),INDEX(Hours.16,ROW()),INDEX(Hours.17,ROW()),INDEX(Hours.18,ROW()),INDEX(Hours.19,ROW()),INDEX(Hours.20,ROW()),INDEX(Hours.21,ROW())INDEX(Hours.22,ROW()),INDEX(Hours.23,ROW()),INDEX(Hours.24,ROW()),INDEX(Hours.25,ROW()),INDEX(Hours.26,ROW()),INDEX(Hours.27,ROW()),INDEX(Hours.28,ROW()),INDEX(Hours.29,ROW()),INDEX(Hours.30,ROW()),INDEX(Hours.31,ROW()))

0 0

Replies

replied on October 28, 2021

From what you provided, it looks like your table variable is Hours and and each of your columns is supposed to have a number as a variable, but that won't work as numbers cannot be variables. If you look back at your column variables, you will likely see V_1, V_2, etc., so you'll need to update the variables in your formula. If it were me, I would rename the variables, but that's your choice.

I created a test table based on your formula and it worked fine:

=SUM(INDEX(Table.Hours1,ROW()),INDEX(Table.Hours2,ROW()),INDEX(Table.Hours3,ROW()),INDEX(Table.Hours4,ROW()),INDEX(Table.Hours5,ROW()))

3 0
You are not allowed to follow up in this post.

Sign in to reply to this post.