+ Reply to Thread
Results 1 to 3 of 3

Auto Generate Serial No.

  1. #1
    Forum Contributor
    Join Date
    10-16-2010
    Location
    bangalore
    MS-Off Ver
    Excel 2019
    Posts
    288

    Auto Generate Serial No.

    I have created a command button1 in excel. When I clicked on that button Serial No.should come in the colulmn A1 and If I click next time it should come in A2. What is the VBA code that i should linked to the command button1? Please suggest.

    The serial no.should be 1 2 3 4 ..............etc..

  2. #2
    Forum Contributor johnjohns's Avatar
    Join Date
    11-19-2007
    Location
    Dubai, UAE
    MS-Off Ver
    2003 and 2007
    Posts
    526

    Re: Auto Generate Serial No.

    Type 1 in A1 cell and for rest use this
    Please Login or Register  to view this content.
    rgds

    johnjohns

  3. #3
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: Auto Generate Serial No.

    You shouldn't need VBA. If the column is part of a table of data then using

    =Row(a1-1 and converting the data to an Excel 2007 Table will mean that as you continue to enter data in the Table the formula will copy itself & give you the relevant serial number
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

+ 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