+ Reply to Thread
Results 1 to 11 of 11

Autofill Macro Monthly

  1. #1
    Registered User
    Join Date
    07-09-2008
    Location
    Japan
    Posts
    7

    Autofill Macro Monthly

    First off let me say that I am a VB/Macro noob. That being said I have searched through every post I could find prior to finally deciding to post this. All I want to do is set up a macro to autofill into a new column every month. My data is linked to another excel document so that is where it is pulling the data from. Currently I have data in columns monthly from Dec 2001 until June 2008. I just want a macro that will automatically add in the next month, so in this case July then August the following month ect. As I said I have expended my searching capabilites and have not come across an answer. If anyone can help I would be very greatful.

  2. #2
    Forum Contributor
    Join Date
    10-01-2007
    Posts
    101
    so when the month changes from july to august you want a column inserted and populated with new data?

  3. #3
    Registered User
    Join Date
    07-09-2008
    Location
    Japan
    Posts
    7
    My data runs from left (Dec 2001) to right (June 2008) so I don't need a new column added in. I have charts based off the data and have set them up so they automatically update as a new month is added.
    Last edited by phineus69; 07-14-2008 at 02:29 AM.

  4. #4
    Forum Contributor
    Join Date
    10-01-2007
    Posts
    101
    if you want to add to the end of a column range you may need to find the first empty column to the right. this thread talks about that. im a noob too so i dont know if this helps.

    http://www.excelforum.com/showthread.php?t=648982

    if you wanted to add the new month to the first column then you could do something like

    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    07-09-2008
    Location
    Japan
    Posts
    7
    That link only confused me more cause that person is trying to copy cells whereas I need to autofill from the last couple of months

  6. #6
    Forum Contributor
    Join Date
    02-27-2008
    Posts
    764

    macro

    Hi
    try the following macro codes
    Please Login or Register  to view this content.
    It fills col A with month and year upto the current month
    Ravi

  7. #7
    Registered User
    Join Date
    07-09-2008
    Location
    Japan
    Posts
    7
    Sorry to be a pain. I've attached my excel document to better aid someone in helping me.
    Attached Files Attached Files

  8. #8
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    Win10/MSO2016
    Posts
    12,996
    I'm not sure what you're after but the code below will compare the date in the last column with the current date, and, if the months are different, it will add the current month in the next column of the header row:
    Please Login or Register  to view this content.
    Ben Van Johnson

  9. #9
    Registered User
    Join Date
    07-09-2008
    Location
    Japan
    Posts
    7
    I wan't pretty much what you just gave me but for it to autofill all the way down that particular column that its filling in the month of.

  10. #10
    Registered User
    Join Date
    07-09-2008
    Location
    Japan
    Posts
    7
    Something like the below code but I want it to go to the end of the columns to where the first blank column is (going to to the right) select the previous 2 columns with data (back 2 to the left) then autofill to that blank column (on the right). Does that make sense?

    Please Login or Register  to view this content.

  11. #11
    Registered User
    Join Date
    07-09-2008
    Location
    Japan
    Posts
    7
    Bump No Reply

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1