+ Reply to Thread
Results 1 to 6 of 6

Autofill cell from cell above via vba

  1. #1
    Registered User
    Join Date
    04-19-2012
    Location
    Leeds, England
    MS-Off Ver
    Office for Mac 2011
    Posts
    17

    Exclamation Autofill cell from cell above via vba

    What i am trying to do is.

    When a button is pressed i want information to be populated into a sheet which is fine. I would also like the sheet to autofill the cell below. In cell A2 is a customer code MANC0001. When the button is pressed i want the cell below it to show MANC0002 and so on every time the button is pressed.

    What i have so far is:

    Please Login or Register  to view this content.
    But with this i get error 1004

    Any help on this would be fantastic.

    Thanks

    Adam

  2. #2
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Autofill cell from cell above via vba

    Try this
    Please Login or Register  to view this content.
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

  3. #3
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: Autofill cell from cell above via vba

    you could simplify to
    Please Login or Register  to view this content.
    Josie

    if at first you don't succeed try doing it the way your wife told you to

  4. #4
    Registered User
    Join Date
    04-19-2012
    Location
    Leeds, England
    MS-Off Ver
    Office for Mac 2011
    Posts
    17

    Re: Autofill cell from cell above via vba

    Thats great joseph, works like a charm.

    However, when i try and populate the sheet with the other information that is put into the first blank column, the information is going into row 4 instead of row 2. I have attached a screen shot of what i am talking about.

    The code i have is
    Please Login or Register  to view this content.
    Screen Shot 2012-07-24 at 14.43.02.png

  5. #5
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: Autofill cell from cell above via vba

    it looks like you have cells that aren't really blank in the first tow rows of columns B onward. maybe try
    Please Login or Register  to view this content.

  6. #6
    Registered User
    Join Date
    04-19-2012
    Location
    Leeds, England
    MS-Off Ver
    Office for Mac 2011
    Posts
    17

    Re: Autofill cell from cell above via vba

    legend.

    Thanks

+ 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