AnsweredAssumed Answered

Using a while loop to add multiple column values together

Question asked by ekr024 on Nov 17, 2015
Latest reply on Dec 11, 2015 by ekr024

Hi, in my team we are using a list to forecast estimated costs of the months in 2016. Each month have a column assigned a value in USD.


In another list we need to see if the forecasted values of one line meets the actuals. So we quite often will need to get the forecasted value of a period containing several months, for example March-June.


My thought was to create a while loop that through use of variables and math operations will go through the different columns. I was hoping to be able to use a variable when determing what column to pick the value from, but this does not seem to be possible. 2nd option would be to build a string and use the variables to identify what column to get information from but I would then need to access information from the other list which doesnt seem to be possible. Unless I go through the trouble of creating a variable for every single column (around 26). Can someone advice of a better option?