+ Reply to Thread
Results 1 to 16 of 16

Auto increment next cell when adding multiple entries from userform

  1. #1
    Registered User
    Join Date
    10-15-2012
    Location
    Pretoria, South Africa
    MS-Off Ver
    Excel 2010
    Posts
    10

    Auto increment next cell when adding multiple entries from userform

    Hi,

    This is driving me nuts, please help!!

    I have 5 textboxes on a userform, this is a stock updater from. If my txtQty textbox reads 5, it does add the details 5 times to a spreadsheet called "Log Information".

    Problem is I need it to auto increment the serial number colomn based on the quantity textbox. Thus, if I have serial number 100 inserted in my userform and the quantity reads 5 I want all the information to be added to the spreadsheet but the serial number colomn must auto increment each row to the next value. i.e:

    Name Serial Number bla bla blaaa
    Chris 100
    Chris 101
    Chris 102
    Chris 103....etc.

    This is the code I have adding the data to the spreadsheet.

    Please Login or Register  to view this content.
    ****Please help****

  2. #2
    Forum Expert
    Join Date
    11-29-2010
    Location
    Ukraine
    MS-Off Ver
    Excel 2019
    Posts
    4,168

    Re: Auto increment next cell when adding multiple entries from userform

    hi there,

    try sort of that:

    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    10-15-2012
    Location
    Pretoria, South Africa
    MS-Off Ver
    Excel 2010
    Posts
    10

    Re: Auto increment next cell when adding multiple entries from userform

    Hi waterserv,

    Thank you very much, wirks like a charm. One thing is that if the serial number is alphanumeric it does not update the worksheet, meaning all data are filled in except the serial number colomn...any ideas?

    Thanks again for your reply.

  4. #4
    Forum Expert
    Join Date
    11-29-2010
    Location
    Ukraine
    MS-Off Ver
    Excel 2019
    Posts
    4,168

    Re: Auto increment next cell when adding multiple entries from userform

    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    10-15-2012
    Location
    Pretoria, South Africa
    MS-Off Ver
    Excel 2010
    Posts
    10

    Re: Auto increment next cell when adding multiple entries from userform

    Hi watersev,

    I have added that code as follows:

    Please Login or Register  to view this content.
    This has stopped the auto increment and the serial number stays the same.

    Any ideas?

  6. #6
    Forum Expert
    Join Date
    11-29-2010
    Location
    Ukraine
    MS-Off Ver
    Excel 2019
    Posts
    4,168

    Re: Auto increment next cell when adding multiple entries from userform

    these lines doing increment twice:

    1st time increment
    Please Login or Register  to view this content.
    2 increment
    Please Login or Register  to view this content.
    All those lines should be replaced with:

    Please Login or Register  to view this content.
    Last edited by watersev; 12-12-2012 at 08:45 AM.

  7. #7
    Registered User
    Join Date
    10-15-2012
    Location
    Pretoria, South Africa
    MS-Off Ver
    Excel 2010
    Posts
    10

    Re: Auto increment next cell when adding multiple entries from userform

    Hi watersev,

    Please excuse if I am asking stupid questions or making stupid mistakes.

    I have changed all the lines as follows:

    Please Login or Register  to view this content.
    this is still not incrementing the serial number.

    Am a doing something stupid here?

    Still trying to figure all thia out.

  8. #8
    Registered User
    Join Date
    10-15-2012
    Location
    Pretoria, South Africa
    MS-Off Ver
    Excel 2010
    Posts
    10

    Re: Auto increment next cell when adding multiple entries from userform

    Hi watersev,

    Please excuse if I am asking stupid questions or making stupid mistakes.

    I have changed all the lines as follows:

    Please Login or Register  to view this content.
    this is still not incrementing the serial number.

    Am a doing something stupid here?

    Still trying to figure all thia out.

  9. #9
    Forum Expert
    Join Date
    11-29-2010
    Location
    Ukraine
    MS-Off Ver
    Excel 2019
    Posts
    4,168

    Re: Auto increment next cell when adding multiple entries from userform

    post a workbook

  10. #10
    Registered User
    Join Date
    10-15-2012
    Location
    Pretoria, South Africa
    MS-Off Ver
    Excel 2010
    Posts
    10

    Re: Auto increment next cell when adding multiple entries from userform

    Project attached

    Thanks again for your help with this.
    Attached Files Attached Files

  11. #11
    Forum Expert
    Join Date
    11-29-2010
    Location
    Ukraine
    MS-Off Ver
    Excel 2019
    Posts
    4,168

    Re: Auto increment next cell when adding multiple entries from userform

    if I get everything right the originally posted code should be:

    Please Login or Register  to view this content.
    As a result new records are added in Information Log sheet. Column B is incremented if numeric, if it's not - same value in the whole range.

    Aside from the absence of check for valid date and quantity positive integer entered, I do not see any problem on incrementing

  12. #12
    Registered User
    Join Date
    10-15-2012
    Location
    Pretoria, South Africa
    MS-Off Ver
    Excel 2010
    Posts
    10

    Re: Auto increment next cell when adding multiple entries from userform

    Hi watersev,

    Sorry for the delay in response.

    Is there any way of auto incrementing a number even though it is alphanumeric? Almost all my serial numbers end with 3 digits at the end, i.e A345A123 or 145A23C232.

  13. #13
    Forum Expert
    Join Date
    11-29-2010
    Location
    Ukraine
    MS-Off Ver
    Excel 2019
    Posts
    4,168

    Re: Auto increment next cell when adding multiple entries from userform

    Please Login or Register  to view this content.

  14. #14
    Registered User
    Join Date
    10-15-2012
    Location
    Pretoria, South Africa
    MS-Off Ver
    Excel 2010
    Posts
    10

    Re: Auto increment next cell when adding multiple entries from userform

    Hi watersev,

    Thank you for the time you have taken to help me with this, I really do appreciate it.

    The above code works perfect for my alphanumeric numbers but it does not increment only numeric numbers now?

    But please do not worry about it, I will look at some of the previous code you have sent me and figure it out.

    Thanks again and enjoy your Christmas.

  15. #15
    Forum Expert
    Join Date
    11-29-2010
    Location
    Ukraine
    MS-Off Ver
    Excel 2019
    Posts
    4,168

    Re: Auto increment next cell when adding multiple entries from userform

    please change this:

    Please Login or Register  to view this content.
    to

    Please Login or Register  to view this content.

  16. #16
    Registered User
    Join Date
    10-15-2012
    Location
    Pretoria, South Africa
    MS-Off Ver
    Excel 2010
    Posts
    10

    Re: Auto increment next cell when adding multiple entries from userform

    Hi watersev,

    This did sort the problem, thank again.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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