Hi Osiso Below is some code which prints all the month form 1997 to 2009 in 199701,199702 format with a single loop. To test it just paste it in a module.
If it will not help you then please clearly mention your problem. Sub month_list() year_start = 1997 year_end = 2009 months = 199700 i = 1 Do Worksheets(1).Range("a1").Offset(i - 1, 0).Value = months + 1 If i Mod 12 = 0 Then months = months - 12 + 100 End If months = months + 1 i = i + 1 Loop While months <= 200912 End Sub ----- Original Message ----- From: "osiso" <fahe...@gmail.com> To: "MS EXCEL AND VBA MACROS" <excel-macros@googlegroups.com> Sent: Wednesday, August 19, 2009 10:51 PM Subject: $$Excel-Macros$$ need a good method to count next 5 months I have this list from '97- 2009 where I run a macro in months 5, 11. I have another macro that runs between these months (6-10, and 12-4). For the list below, I have a macro that reads a column and runs these values. 199705 199711 199805 199811 . . . 200905 Currently after I run month 199711 I have to manually enter in the next 5 months because of the December issue (199711 -> 199712, 199713,199714 happens with a simple counter). I have another column that has all the months listed from 199705- >200905. I would like a macro to automatically run for the next 5 months regardless if its 199712 or 199705. Any suggestions? --~--~---------~--~----~------------~-------~--~----~ ---------------------------------------------------------------------------------- Some important links for excel users: 1. Excel and VBA Tutorials(Video and Text), Free add-ins downloads at http://www.excelitems.com 2. Excel tutorials at http://www.excel-macros.blogspot.com 3. Learn VBA Macros at http://www.vbamacros.blogspot.com 4. Excel Tips and Tricks at http://exceldailytip.blogspot.com To post to this group, send email to excel-macros@googlegroups.com If you find any spam message in the group, please send an email to: Ayush Jain @ jainayus...@gmail.com or Ashish Jain @ 26may.1...@gmail.com <><><><><><><><><><><><><><><><><><><><><><> HELP US GROW !! We reach over 5,200 subscribers worldwide and receive many nice notes about the learning and support from the group. Our goal is to have 10,000 subscribers by the end of 2009. Let friends and co-workers know they can subscribe to group at http://groups.google.com/group/excel-macros/subscribe -~----------~----~----~----~------~----~------~--~---