+ Reply to Thread
Results 1 to 8 of 8

Generate a unique form number

Hybrid View

  1. #1
    quartz
    Guest

    Generate a unique form number

    I am using Office 2003 on Windows XP.

    I have a form built in Excel that will be placed in an Outlook folder making
    it accessible to all users within our organization.

    Each time a user opens this form a unique number must be generated on the
    form.

    Suppose I convert the Excel date to a value: e.g. Aug 17, 2005 becomes 38363
    and for time I use 5:34:15 pm = 173415. Now suppose I add these two numbers
    together and also add the user's computer ID to this (each user must have a
    unique computer ID) for example: 83177.

    This would then be 38363 + 173415 + 83177 = 294955

    Question: Since this value is date and time based and combines a unique
    computer ID, would this ALWAYS generate a unique six digit form number?

    The form number does need to be unique, but not necessarily in sequence Any
    one have any other suggestions?

  2. #2
    Norman Jones
    Guest

    Re: Generate a unique form number

    Hi Quartz,

    See JE McGimpsey's Sequential Numbers page at:

    http://www.mcgimpsey.com/excel/udfs/sequentialnums.html


    ---
    Regards,
    Norman



    "quartz" <quartz@discussions.microsoft.com> wrote in message
    news:ADABD92D-F504-4C33-A4B4-C8B1E18FB6D7@microsoft.com...
    >I am using Office 2003 on Windows XP.
    >
    > I have a form built in Excel that will be placed in an Outlook folder
    > making
    > it accessible to all users within our organization.
    >
    > Each time a user opens this form a unique number must be generated on the
    > form.
    >
    > Suppose I convert the Excel date to a value: e.g. Aug 17, 2005 becomes
    > 38363
    > and for time I use 5:34:15 pm = 173415. Now suppose I add these two
    > numbers
    > together and also add the user's computer ID to this (each user must have
    > a
    > unique computer ID) for example: 83177.
    >
    > This would then be 38363 + 173415 + 83177 = 294955
    >
    > Question: Since this value is date and time based and combines a unique
    > computer ID, would this ALWAYS generate a unique six digit form number?
    >
    > The form number does need to be unique, but not necessarily in sequence
    > Any
    > one have any other suggestions?




  3. #3
    quartz
    Guest

    Re: Generate a unique form number

    Thanks Norman.

    I don't need sequential numbers, just unique ones. I don't really want to
    mess with the registry nor maintain a separate file to track the numbers.

    That's why I was looking for a numbering method that could be generated
    based on date, time, and user computer ID. Do you think my concept would work
    to generate a unique number?

    Even if two users happened to open the template file within the same second,
    their unique box ID would still render a unique number. I'm just worried
    about numbering overlap between years, etc. What do you think? - Do you know
    any other websites to check?

    Thanks much for your help!

    "Norman Jones" wrote:

    > Hi Quartz,
    >
    > See JE McGimpsey's Sequential Numbers page at:
    >
    > http://www.mcgimpsey.com/excel/udfs/sequentialnums.html
    >
    >
    > ---
    > Regards,
    > Norman
    >
    >
    >
    > "quartz" <quartz@discussions.microsoft.com> wrote in message
    > news:ADABD92D-F504-4C33-A4B4-C8B1E18FB6D7@microsoft.com...
    > >I am using Office 2003 on Windows XP.
    > >
    > > I have a form built in Excel that will be placed in an Outlook folder
    > > making
    > > it accessible to all users within our organization.
    > >
    > > Each time a user opens this form a unique number must be generated on the
    > > form.
    > >
    > > Suppose I convert the Excel date to a value: e.g. Aug 17, 2005 becomes
    > > 38363
    > > and for time I use 5:34:15 pm = 173415. Now suppose I add these two
    > > numbers
    > > together and also add the user's computer ID to this (each user must have
    > > a
    > > unique computer ID) for example: 83177.
    > >
    > > This would then be 38363 + 173415 + 83177 = 294955
    > >
    > > Question: Since this value is date and time based and combines a unique
    > > computer ID, would this ALWAYS generate a unique six digit form number?
    > >
    > > The form number does need to be unique, but not necessarily in sequence
    > > Any
    > > one have any other suggestions?

    >
    >
    >


  4. #4
    Norman Jones
    Guest

    Re: Generate a unique form number

    Hi Quartz,

    I seem to recall an especially interesting post from Harlan Grove on the
    topic of creating unique numbers.

    It might be worth performing a google search for Harlan's Unique Number
    contributions.


    ---
    Regards,
    Norman



    "quartz" <quartz@discussions.microsoft.com> wrote in message
    news:E007D97B-980D-444A-8E99-3644B00238FB@microsoft.com...
    > Thanks Norman.
    >
    > I don't need sequential numbers, just unique ones. I don't really want to
    > mess with the registry nor maintain a separate file to track the numbers.
    >
    > That's why I was looking for a numbering method that could be generated
    > based on date, time, and user computer ID. Do you think my concept would
    > work
    > to generate a unique number?
    >
    > Even if two users happened to open the template file within the same
    > second,
    > their unique box ID would still render a unique number. I'm just worried
    > about numbering overlap between years, etc. What do you think? - Do you
    > know
    > any other websites to check?
    >
    > Thanks much for your help!
    >
    > "Norman Jones" wrote:
    >
    >> Hi Quartz,
    >>
    >> See JE McGimpsey's Sequential Numbers page at:
    >>
    >> http://www.mcgimpsey.com/excel/udfs/sequentialnums.html
    >>
    >>
    >> ---
    >> Regards,
    >> Norman
    >>
    >>
    >>
    >> "quartz" <quartz@discussions.microsoft.com> wrote in message
    >> news:ADABD92D-F504-4C33-A4B4-C8B1E18FB6D7@microsoft.com...
    >> >I am using Office 2003 on Windows XP.
    >> >
    >> > I have a form built in Excel that will be placed in an Outlook folder
    >> > making
    >> > it accessible to all users within our organization.
    >> >
    >> > Each time a user opens this form a unique number must be generated on
    >> > the
    >> > form.
    >> >
    >> > Suppose I convert the Excel date to a value: e.g. Aug 17, 2005 becomes
    >> > 38363
    >> > and for time I use 5:34:15 pm = 173415. Now suppose I add these two
    >> > numbers
    >> > together and also add the user's computer ID to this (each user must
    >> > have
    >> > a
    >> > unique computer ID) for example: 83177.
    >> >
    >> > This would then be 38363 + 173415 + 83177 = 294955
    >> >
    >> > Question: Since this value is date and time based and combines a unique
    >> > computer ID, would this ALWAYS generate a unique six digit form number?
    >> >
    >> > The form number does need to be unique, but not necessarily in sequence
    >> > Any
    >> > one have any other suggestions?

    >>
    >>
    >>




  5. #5
    quartz
    Guest

    Re: Generate a unique form number

    Thanks again Norman. I will definately look up Mr. Grove...

    "Norman Jones" wrote:

    > Hi Quartz,
    >
    > I seem to recall an especially interesting post from Harlan Grove on the
    > topic of creating unique numbers.
    >
    > It might be worth performing a google search for Harlan's Unique Number
    > contributions.
    >
    >
    > ---
    > Regards,
    > Norman
    >
    >
    >
    > "quartz" <quartz@discussions.microsoft.com> wrote in message
    > news:E007D97B-980D-444A-8E99-3644B00238FB@microsoft.com...
    > > Thanks Norman.
    > >
    > > I don't need sequential numbers, just unique ones. I don't really want to
    > > mess with the registry nor maintain a separate file to track the numbers.
    > >
    > > That's why I was looking for a numbering method that could be generated
    > > based on date, time, and user computer ID. Do you think my concept would
    > > work
    > > to generate a unique number?
    > >
    > > Even if two users happened to open the template file within the same
    > > second,
    > > their unique box ID would still render a unique number. I'm just worried
    > > about numbering overlap between years, etc. What do you think? - Do you
    > > know
    > > any other websites to check?
    > >
    > > Thanks much for your help!
    > >
    > > "Norman Jones" wrote:
    > >
    > >> Hi Quartz,
    > >>
    > >> See JE McGimpsey's Sequential Numbers page at:
    > >>
    > >> http://www.mcgimpsey.com/excel/udfs/sequentialnums.html
    > >>
    > >>
    > >> ---
    > >> Regards,
    > >> Norman
    > >>
    > >>
    > >>
    > >> "quartz" <quartz@discussions.microsoft.com> wrote in message
    > >> news:ADABD92D-F504-4C33-A4B4-C8B1E18FB6D7@microsoft.com...
    > >> >I am using Office 2003 on Windows XP.
    > >> >
    > >> > I have a form built in Excel that will be placed in an Outlook folder
    > >> > making
    > >> > it accessible to all users within our organization.
    > >> >
    > >> > Each time a user opens this form a unique number must be generated on
    > >> > the
    > >> > form.
    > >> >
    > >> > Suppose I convert the Excel date to a value: e.g. Aug 17, 2005 becomes
    > >> > 38363
    > >> > and for time I use 5:34:15 pm = 173415. Now suppose I add these two
    > >> > numbers
    > >> > together and also add the user's computer ID to this (each user must
    > >> > have
    > >> > a
    > >> > unique computer ID) for example: 83177.
    > >> >
    > >> > This would then be 38363 + 173415 + 83177 = 294955
    > >> >
    > >> > Question: Since this value is date and time based and combines a unique
    > >> > computer ID, would this ALWAYS generate a unique six digit form number?
    > >> >
    > >> > The form number does need to be unique, but not necessarily in sequence
    > >> > Any
    > >> > one have any other suggestions?
    > >>
    > >>
    > >>

    >
    >
    >


  6. #6
    Henry
    Guest

    Re: Generate a unique form number

    quartz,

    This will not give a unique number.
    If the same user goes in the next day, but 1 second earlier, your formula
    would give the same result.
    Same user number, date increased by 1, time reduced by 1.

    Henry

    "quartz" <quartz@discussions.microsoft.com> wrote in message
    news:ADABD92D-F504-4C33-A4B4-C8B1E18FB6D7@microsoft.com...
    >I am using Office 2003 on Windows XP.
    >
    > I have a form built in Excel that will be placed in an Outlook folder
    > making
    > it accessible to all users within our organization.
    >
    > Each time a user opens this form a unique number must be generated on the
    > form.
    >
    > Suppose I convert the Excel date to a value: e.g. Aug 17, 2005 becomes
    > 38363
    > and for time I use 5:34:15 pm = 173415. Now suppose I add these two
    > numbers
    > together and also add the user's computer ID to this (each user must have
    > a
    > unique computer ID) for example: 83177.
    >
    > This would then be 38363 + 173415 + 83177 = 294955
    >
    > Question: Since this value is date and time based and combines a unique
    > computer ID, would this ALWAYS generate a unique six digit form number?
    >
    > The form number does need to be unique, but not necessarily in sequence
    > Any
    > one have any other suggestions?




  7. #7
    quartz
    Guest

    Re: Generate a unique form number

    Oh yeah... :-(

    Thanks for your response.

    "Henry" wrote:

    > quartz,
    >
    > This will not give a unique number.
    > If the same user goes in the next day, but 1 second earlier, your formula
    > would give the same result.
    > Same user number, date increased by 1, time reduced by 1.
    >
    > Henry
    >
    > "quartz" <quartz@discussions.microsoft.com> wrote in message
    > news:ADABD92D-F504-4C33-A4B4-C8B1E18FB6D7@microsoft.com...
    > >I am using Office 2003 on Windows XP.
    > >
    > > I have a form built in Excel that will be placed in an Outlook folder
    > > making
    > > it accessible to all users within our organization.
    > >
    > > Each time a user opens this form a unique number must be generated on the
    > > form.
    > >
    > > Suppose I convert the Excel date to a value: e.g. Aug 17, 2005 becomes
    > > 38363
    > > and for time I use 5:34:15 pm = 173415. Now suppose I add these two
    > > numbers
    > > together and also add the user's computer ID to this (each user must have
    > > a
    > > unique computer ID) for example: 83177.
    > >
    > > This would then be 38363 + 173415 + 83177 = 294955
    > >
    > > Question: Since this value is date and time based and combines a unique
    > > computer ID, would this ALWAYS generate a unique six digit form number?
    > >
    > > The form number does need to be unique, but not necessarily in sequence
    > > Any
    > > one have any other suggestions?

    >
    >
    >


  8. #8
    Tom Ogilvy
    Guest

    Re: Generate a unique form number

    ? cdbl(Now*10^10)
    385823491435185

    It would be highly unlikely that this number would be duplicated. You could
    prepend a unique letter combination for each user to insure uniquensss

    ? "ABC" & cdbl(Now*10^10)
    ABC385823512615741

    --
    Regards,
    Tom Ogilvy


    "quartz" <quartz@discussions.microsoft.com> wrote in message
    news:ADABD92D-F504-4C33-A4B4-C8B1E18FB6D7@microsoft.com...
    > I am using Office 2003 on Windows XP.
    >
    > I have a form built in Excel that will be placed in an Outlook folder

    making
    > it accessible to all users within our organization.
    >
    > Each time a user opens this form a unique number must be generated on the
    > form.
    >
    > Suppose I convert the Excel date to a value: e.g. Aug 17, 2005 becomes

    38363
    > and for time I use 5:34:15 pm = 173415. Now suppose I add these two

    numbers
    > together and also add the user's computer ID to this (each user must have

    a
    > unique computer ID) for example: 83177.
    >
    > This would then be 38363 + 173415 + 83177 = 294955
    >
    > Question: Since this value is date and time based and combines a unique
    > computer ID, would this ALWAYS generate a unique six digit form number?
    >
    > The form number does need to be unique, but not necessarily in sequence

    Any
    > one have any other suggestions?




+ 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