+ Reply to Thread
Results 1 to 7 of 7

AutoFill cell from above macro

  1. #1
    Registered User
    Join Date
    10-10-2007
    Posts
    11

    AutoFill cell from above macro

    I am looking for a macro that will be able to autofill until it reaches a different value. Once it hits that value can it then autofill until the next value and so on?

    Example:

    A1 Cell : 10/10/2007
    A2-A50 are blank

    A51: 10/11/2007
    A52 - A103 are blank

    The problem is that the number of cells between each of the dates varies. Is there a macro that can be created that will autofill the date (so it would autofill 10/10/2007 until it reaches 10/11/2007, then it would autofill from 10/11/2007 until 10/12/2007 and so on). Any help with this would be appreciated. Thanks for your time.

  2. #2
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    See link

    http://contextures.com/xlDataEntry02.html

    VBA Noob
    _________________________________________


    Credo Elvem ipsum etian vivere
    _________________________________________
    A message for cross posters

    Please remember to wrap code.

    Forum Rules

    Please add to your signature if you found this link helpful. Excel links !!!

  3. #3
    Registered User
    Join Date
    10-10-2007
    Posts
    11
    That is perfect. One question though is there a way to have this autofill to a certain cell number. The code ends at the last date, can this be autofilled farther than that to say a specific cell #?

  4. #4
    Registered User
    Join Date
    10-10-2007
    Posts
    11
    Maybe a better example is that the last date is on 10/15 and it autofills to that date. Can I change the code to autofill to a specific cell past that date.

    Example:

    A1500 - 10/15
    A1501 - 1600 are blank

    Can we set the code to fill to cell A1600 instead of stopping at A1500?

  5. #5
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    See i this helps

    Please Login or Register  to view this content.
    VBA Noob

  6. #6
    Registered User
    Join Date
    10-10-2007
    Posts
    11

    Thumbs up

    You rock that is perfect. Thanks again!

  7. #7
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    Glad it helped.

    VBA Noob

+ 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