+ Post New Thread
Results 1 to 4 of 4
How do you do....it? Thread, Re: Generate the next available number in Technical; Do you know of any program, or template which will help me generate the next available number. We have numbers ...
  1. #1

    Join Date
    Jul 2011
    Location
    Ohio
    Posts
    4
    Thank Post
    0
    Thanked 0 Times in 0 Posts
    Rep Power
    0

    Re: Generate the next available number

    Do you know of any program, or template which will help me generate the next available number. We have numbers for PC like 001, 002, 005, 008 now if I need to add a new number, I want the program to give me either 006/007/009.
    Thank you for your support!

  2. #2

    Steve21's Avatar
    Join Date
    Feb 2011
    Location
    Swindon
    Posts
    2,689
    Thank Post
    334
    Thanked 515 Times in 483 Posts
    Rep Power
    179
    In what context? Do you want just a counter in a spreadsheet? script? Do you want it to automatically read AD? Or what?

    Steve

  3. #3

    Join Date
    Jul 2011
    Location
    Ohio
    Posts
    4
    Thank Post
    0
    Thanked 0 Times in 0 Posts
    Rep Power
    0
    Thanks for your response steve21. I'm a novice at this. I need any program or templete which is easy to use. The program must generate the next available number automatically. Is there anything that I can use withought the codes? If not which one can you recommend for a begginer. Thanks

  4. #4

    Steve21's Avatar
    Join Date
    Feb 2011
    Location
    Swindon
    Posts
    2,689
    Thank Post
    334
    Thanked 515 Times in 483 Posts
    Rep Power
    179
    Easiest way to do it would be something like this in excel:

    Code:
    Sub Button1_Click()
    
    Range("M1").Select
    Do Until ActiveCell = "STOP"
        If ActiveCell = "" Then
            a = ActiveCell.Row
            ActiveCell = "Used"
            Range("A1").Select
            ActiveCell = a
            Exit Sub
        Else
             ActiveCell.Offset(1, 0).Select
        End If
    Loop
    
    End Sub
    Capture.PNG

    Will search through the column of numbers, finding the next free one. It'll then post that number in A1, and fill in the spot so next time you search it'll find next one etc etc. (STOP just breaks it out of the loop so it doesn't go on forever )

    Example spreadsheet attached, (Note needs macro enabled)

    TestCounter.zip

    Steve

SHARE:
+ Post New Thread

Similar Threads

  1. Printers - The next big scare story?
    By Halfmad in forum General Chat
    Replies: 15
    Last Post: 7th August 2007, 11:56 PM
  2. If you can't get CISCO which is the next best?
    By e_g_r in forum Wireless Networks
    Replies: 33
    Last Post: 17th September 2006, 10:24 PM
  3. The next newsletter
    By Ric_ in forum General EduGeek News/Announcements
    Replies: 4
    Last Post: 30th May 2006, 02:30 AM
  4. Re-Arranging the Forums.
    By Dos_Box in forum General EduGeek News/Announcements
    Replies: 0
    Last Post: 26th August 2005, 07:54 AM

Thread Information

Users Browsing this Thread

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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •