+ Reply to Thread
Results 1 to 4 of 4

increment number by code

  1. #1
    Forum Contributor
    Join Date
    05-27-2004
    Posts
    119

    increment number by code

    Hi experts,
    I think the following question would be very easy one. Now i am using a very simple formula =b1+1 for incrementing the serial number. But the problem comes when somebody try to delete the row the formula affected. So is it possible to write a code for that ? if so where do i place it , in worksheet module ?
    thanks
    by
    nowfal

  2. #2
    gbor
    Guest

    RE: increment number by code


    In Cell B2
    =OFFSET(A2,-1,0)+1

    This should work because the cell only references itself



    "nowfal" wrote:

    >
    > Hi experts,
    > I think the following question would be very easy one.
    > Now i am using a very simple formula =b1+1 for incrementing the serial
    > number. But the problem comes when somebody try to delete the row the
    > formula affected. So is it possible to write a code for that ? if so
    > where do i place it , in worksheet module ?
    > thanks
    > by
    > nowfal
    >
    >
    > --
    > nowfal
    > ------------------------------------------------------------------------
    > nowfal's Profile: http://www.excelforum.com/member.php...o&userid=10003
    > View this thread: http://www.excelforum.com/showthread...hreadid=388110
    >
    >


  3. #3
    gbor
    Guest

    RE: increment number by code

    Sorry, I had a typo in the first post

    In Cell B2
    =OFFSET(b2,-1,0)+1

    This should work because the cell only references itself


    "nowfal" wrote:

    >
    > Hi experts,
    > I think the following question would be very easy one.
    > Now i am using a very simple formula =b1+1 for incrementing the serial
    > number. But the problem comes when somebody try to delete the row the
    > formula affected. So is it possible to write a code for that ? if so
    > where do i place it , in worksheet module ?
    > thanks
    > by
    > nowfal
    >
    >
    > --
    > nowfal
    > ------------------------------------------------------------------------
    > nowfal's Profile: http://www.excelforum.com/member.php...o&userid=10003
    > View this thread: http://www.excelforum.com/showthread...hreadid=388110
    >
    >


  4. #4
    Forum Contributor
    Join Date
    05-27-2004
    Posts
    119
    Thanks a lot g bor, it works. But still a question is it possible to have it programatically by a code.
    regards
    nowfal

+ 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