Hi, I have a list of month names and I want to loop though the list starting a a specific month let's say June (the 6th month) and going backwards towards January.
MonthList ={"January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"};
//total number of months
nMonths = N Items (MonthList);
//initialize list of selected months
ElevenMo = {};
For (i = 6, i <= 11, i -= 1,
If (i >= 1, Continue () );
nextMonth = MonthList[i];
Insert Into (ElevenMo, nextMonth[i]),
);I think I have the basics but my loop keeps going in an infinite loop. I will appreciate your advice on how to fix it. And yes, at some point the loop has to go back to December, but that will be another battle.