You say that you "have this list". then: "I have a macro that reads a column and runs these values".
Then: you have to "manually enter in the next 5 months".. the confusing part here is trying to figure out where all this information is, where it's coming from and what's happening! i really can't figure out what you'r trying to do. IF you need to get a list of dates in the format yyyymm You can use: column A | Column B 05/01/1997 | =TEXT(YEAR(A1)&TEXT(MONTH(A1),"00"),"######") which will result in: column A | Column B 05/01/1997 | 199705 Copying these cell down gives: column A | Column B 05/01/1997 | 199705 11/01/1997 | 199711 05/01/1998 | 199805 11/01/1998 | 199811 05/01/1999 | 199905 11/01/1999 | 199911 05/01/2000 | 200005 11/01/2000 | 200011 05/01/2001 | 200105 11/01/2001 | 200111 05/01/2002 | 200205 11/01/2002 | 200211 05/01/2003 | 200305 11/01/2003 | 200311 Now, notice that column "B" is TEXT, not numeric, so if you're going to look up a date, you'll want to do something like: Column E | column F 199911 | =VLOOKUP(TEXT(E1,"######"),B:C,2,FALSE) If this is not anywhere CLOSE to the problem you are describing, let's give it another try! Paul ________________________________ From: osiso <fahe...@gmail.com> To: MS EXCEL AND VBA MACROS <excel-macros@googlegroups.com> Sent: Wednesday, August 19, 2009 1:21:32 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 -~----------~----~----~----~------~----~------~--~---