Hi everyone!
i'm very new to VBA and i'm having some issues with nested loop structures.
i'm trying to write down certain values for 30 individuals for 50 days in 2 years. let's suppose i write the following code:
the values are written only for the innermost loop (only for the final year and final day) and i'm not sure how to get around that. In addition, i would like the loops to calculate the value of plants(p,1) for each individual but for that value to be constant throughout the days in a year. For example if plants(p,1) = 27 for individual number 1, i would like the value of 27 to persist for days 1 to UBday (for individul number 1 only) but to be calculated again as soon as a new year starts. I have tried using a collection to do this and it worked fine but the issue is that i need to later perform some calulations within the array and splitting the collection stores the values as string. I am very new to VBA so I have no clue on how to go about this so any help would be greatly appreciated!
Bookmarks