+ Reply to Thread
Results 1 to 3 of 3

Search if same combination is already in the table, add if not found.

  1. #1
    Registered User
    Join Date
    12-31-2022
    Location
    Turkey
    MS-Off Ver
    Microsoft 365 Apps for Enterprise
    Posts
    5

    Question Search if same combination is already in the table, add if not found.

    Hello a very beginner Access user here,

    So I need help building a basic application for the data I already have. Imagine 2 columns with data and depending on the given data and data count, we would like to create a combination ID for these. For example in the image below, first two columns (Label 1-2) has the label data and the 3rd column is the combination ID. So if I would like to use, [A 1 ; A 2 ; A 3 ; B 2] (4 entries) it should create [C1] as combination ID. Also if I would like to use [A 1 ; B 2] (2 entries) it should create [C5] as the combination ID. The real data is more complicated and I simplified it as best as I could.

    In the future when I search with new label dats, it should warn me if I already have a dedicated combination ID for the given data. For example, if I feed [B 3 ; A 3] or [A 3 ; B 3] (without considering the feed order) to it once again in the future, it shouldn't create a new combination ID. Instead it should show me "You already have combination ID for this entries. The combination ID is: C2". Please reply back for more details. Any recommendations are welcome.
    Untitled.png
    Last edited by DesoxyN; 01-04-2023 at 05:58 AM.

  2. #2
    Forum Contributor Gregor y's Avatar
    Join Date
    10-24-2011
    Location
    Colorado, USA
    MS-Off Ver
    Excel 2010 32-Bit
    Posts
    276

    Re: Search if same combination is already in the table, add if not found.

    Oh my, you appear to have a classic Bergholt Stuttley design problem, and your first best solution would be to fix this if at all possible.

    In theory you could more or less divide the data by the lookup(with a couple extra half steps for exact division)...
    (assuming the simplified case where the duplicate entry for [B 1 C4] is a typo, and can be avoided by a uniqueness constraint on the table)
    ExampleDiv-000.png
    ExampleDiv-001.png
    ExampleDiv-010.png
    ExampleDiv-020.png
    ExampleDiv-030.png

    ...

  3. #3
    Forum Contributor Gregor y's Avatar
    Join Date
    10-24-2011
    Location
    Colorado, USA
    MS-Off Ver
    Excel 2010 32-Bit
    Posts
    276

    Re: Search if same combination is already in the table, add if not found.

    cont'd

    ExampleDiv-035.png
    ExampleDiv-037.png
    ExampleDiv-040.png
    ExampleDiv-040-Out.png
    If it'd make you feel better using my answer because of my street cred, then you can go ahead and click Add Reputation below to improve it.

+ 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. [SOLVED] searching a table for only parts of the search term, giving that part out if found
    By Oeko_Marvin in forum Excel - New Users/Basics
    Replies: 4
    Last Post: 12-11-2020, 02:04 PM
  2. Replies: 1
    Last Post: 05-12-2020, 09:51 AM
  3. [SOLVED] if spsified charecter combination found > Colourize the line
    By danezeq in forum Excel General
    Replies: 24
    Last Post: 03-18-2020, 09:47 AM
  4. Replies: 3
    Last Post: 03-03-2020, 06:39 PM
  5. Replies: 4
    Last Post: 05-09-2017, 06:05 AM
  6. Search for value in a range and overwrite if found and create new if not found
    By mm671750 in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 02-04-2016, 01:19 PM

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