+ Reply to Thread
Results 1 to 2 of 2

How to check if values are unique?

  1. #1
    Registered User
    Join Date
    10-13-2014
    Location
    Assen, The netherlands
    MS-Off Ver
    2013
    Posts
    27

    Question How to check if values are unique?

    Hi All,

    I'm afraid the first part of the question must be one of the most "noob" questions ever asked in this forum, but I just can not find how to do this.
    It must be simple, but then again, that's all when you know it :-)

    Here's my question:

    I have made a "userform" to fill in data into cell's on the worksheet "Factuur"
    The information is "Name", "Address", "Phone", "Email" etc.
    This userform functions. (And Yes, I know, the code is not good, but I could not fiddle out how else to make it work)
    (I will make a separate post to clean up this code)

    I have a sheet called "NAW" and the information from the fields on "Factuur" (e.g. : "Name", "Address", "Phone", "Email" etc.) should be placed in that sheet.
    The first customer I put in, will have cell A2 till lets say G2.
    The next customer will have A3 till G3, etc.

    There are some tricky parts:
    - Not all the fields are mandatory, so the data from the new customer needs to have a clean "row" (I can not use +1 code for the cells)
    - The customer needs to get a unique customer-number, This can be simple, like first customer customer ID 1, second 2, etc.

    One of the things that would really be a great extra, is when the Userform3 also can look at the values put in in the past.
    Some more explanation for this:

    Lets say I have a customer with the name "Jones", and I type in the name Jones, the address field should give me all the addresses of all the customers with the name "Jones", and a blank field, for the case this Jones is a new customer. The same goes for the fields Phone, Email, etc.

    If this is possible, I can have / start to build up a "database" with unique customer information.

    To make it even more "complex"...
    The "Factuur" sheet all way's will have a unique "Factuur nr." it this case it will look like "2014341"

    If the first part is possible,
    then this next part should be possible also:
    The Factuur nr. , a unique value need to be copied into the customers "ID row".
    If this customer "Jones" come's 15 times, there need to be added 15 times the "Factuur nr."
    I don't know what's the best solution for this.

    Somehow I guess the only way is to make for every visit of that customer a new column, and add the "Factuur nr." in that column.
    But that doesn't look "****" :-)

    Also, I like to add the date, that the customer has visit. This gives more insight in customer loyalty.

    Lot's of stuff to think about!

    If you can push me a bit in the right direction, that would be great!
    Attached Files Attached Files
    Last edited by Fhorst; 10-22-2014 at 07:00 PM. Reason: Edit question title

  2. #2
    Forum Expert Tsjallie's Avatar
    Join Date
    09-15-2012
    Location
    NL
    MS-Off Ver
    2010, 2013, 2016
    Posts
    2,077

    Re: How to check if values are unique?

    Not all the fields are mandatory, so the data from the new customer needs to have a clean "row" (I can not use +1 code for the cells)
    Using atable should make this (relatively) easy.

    Lets say I have a customer with the name "Jones", and I type in the name Jones, the address field should give me all the addresses of all the customers with the name "Jones", and a blank field, for the case this Jones is a new customer. The same goes for the fields Phone, Email, etc.
    That shouldn't be too difficult

    If this customer "Jones" come's 15 times, there need to be added 15 times the "Factuur nr." I don't know what's the best solution for this.
    Will you register customer data for every invoice they get?
    Wouldn't do that.
    You could set up an Invoices table and have the customer's id be part of it.

    Somehow I guess the only way is to make for every visit of that customer a new column, and add the "Factuur nr." in that column.
    But that doesn't look "****" :-)
    Indeed it will.
    And see previous remark.

    BTW, checking if values are unique can simply be by counting their occurences.
    Cheers!
    Tsjallie




    --------
    If your problem is solved, pls mark the thread SOLVED (see Thread Tools in the menu above). Thank you!

    If you think design is an expensive waste of time, try doing without ...

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Formula to check unique values based on data from 2 columns
    By notsobrilliant in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 07-10-2013, 04:15 PM
  2. Select multiple criteria based on check box selection and return all unique values.
    By TommyToe in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 01-21-2013, 09:14 AM
  3. scaling an exisiting macro for unique values of X for Unique values of Y.
    By widodude in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 02-18-2011, 09:33 PM
  4. Check: Ensure all Values in a Range Are Unique
    By JungleJme in forum Excel General
    Replies: 4
    Last Post: 04-14-2010, 09:33 AM
  5. check for duplicates, then sum unique values
    By Weissme in forum Excel General
    Replies: 0
    Last Post: 08-09-2006, 11:35 AM

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