+ Reply to Thread
Results 1 to 3 of 3

Help with assigning individual ref numbers

Hybrid View

  1. #1
    Registered User
    Join Date
    09-20-2011
    Location
    Chester, England
    MS-Off Ver
    Excel 2003
    Posts
    1

    Help with assigning individual ref numbers

    Hi,

    I am wanting to crete a simple table whereby once I hae assigned a unique ref number once it cannot be re allocated.

    Is there a formula or a way of doing this?

    For example if I assign 123456789 as a ref num to a product caled Oranges, if someone else tries to use that 123456789 ref number then an error message etc would occur

  2. #2
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Help with assigning individual ref numbers

    use data validation
    eg allow custom formula =countif(b:b,b1)=1
    warning you can still paste in a value the same and validation will be ignored,
    Attached Files Attached Files
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  3. #3
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: Help with assigning individual ref numbers

    Assuming you are talking about manually entering Ref # down a column (let's say Col B). You can use Data Validation.
    Select your range (i.e. B2:B1000), go to data validation> Use Custom

    =COUNTIF($B$2:B2,B2)<2

    Warning: Data validation only works for manual entries. It will not work if people cut and paste or you are using formulas.
    ChemistB
    My 2?

    substitute commas with semi-colons if your region settings requires
    Don't forget to mark threads as "Solved" (Edit First post>Advanced>Change Prefix)
    If I helped, Don't forget to add to my reputation (click on the little star at bottom of this post)

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

+ 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