+ Reply to Thread
Results 1 to 6 of 6

Automatic increment of a number

  1. #1
    Registered User
    Join Date
    01-09-2013
    Location
    Derby, England
    MS-Off Ver
    Excel 2010
    Posts
    3

    Automatic increment of a number

    Hello everyone,

    I am very new to Visual basic and i am trying to create a returns sheet using Excel 2010, in the sheet (cell C3) is a returns number (currently RRD-001) What i want to do is make the returns number increase by 1 everytime the spread sheet is opened. I have tried several different codes found on the internet but none of them seem to work.

    Can any one help me with this and let me know what i actually need to do to get this to work.

    Thanks in advanced for any help!

    Carla

  2. #2
    Registered User
    Join Date
    01-05-2013
    Location
    Sheffield
    MS-Off Ver
    Excel 2010
    Posts
    31

    Re: Automatic increment of a number

    http://www.ozgrid.com/forum/showthread.php?t=31037

    Hope this helps. it helped me

  3. #3
    Registered User
    Join Date
    01-09-2013
    Location
    Derby, England
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: Automatic increment of a number

    Thank you for getting back to me! I have tried this and this is the first one that doesnt bring up any errors however it still isnt increasing the number when the workbook is opened.

  4. #4
    Registered User
    Join Date
    01-05-2013
    Location
    Sheffield
    MS-Off Ver
    Excel 2010
    Posts
    31

    Re: Automatic increment of a number

    Sorry to hear that.
    It works for me but i'm using a numerical value only. i.e, 114 or 128 by the look of things you don't have a true numerical value in RRD-001. I would imagine it's because of the letters.

    Sorry I can't be of any further help.

  5. #5
    Registered User
    Join Date
    01-09-2013
    Location
    Derby, England
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: Automatic increment of a number

    Ive just changed the value to 001 but it still doesnt seem to up issue the number

  6. #6
    Registered User
    Join Date
    01-05-2013
    Location
    Sheffield
    MS-Off Ver
    Excel 2010
    Posts
    31

    Re: Automatic increment of a number

    did you give the cell(s) a range name?
    Also, the code has to go in the workbook open() subroutine

    mine looks like this.

    Please Login or Register  to view this content.
    and I named the range of my cell rangenumber1

    Try the attached file.

    Hope this helps.
    Attached Files Attached Files
    Last edited by sheffieldlad; 01-09-2013 at 11:56 AM. Reason: made a mess of the code tags...

+ 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