Results 1 to 10 of 10

How to identify difference in values and give result based on certain criteria?

Threaded View

  1. #1
    Forum Contributor
    Join Date
    01-01-2022
    Location
    India
    MS-Off Ver
    Home 2021
    Posts
    964

    How to identify difference in values and give result based on certain criteria?

    Hi all,

    Hope all are well.

    In attached file, there are 3 sheets.

    Source Data Sheet contains 2 columns - Trade Item Number and Market. The numbers can have multiple codes in same column with different values in another column (highlighted in yellow).

    Ex. In rows, 79, 275, 503 and 638, 06291107430881 is linked with codes KW, OM, JO and QA.


    Sheet System Data contains 3 columns - Trade Item Number , Primary Market and Additional Market. The column Trade Item Number can have repeated numbers in same column with different values in another 2 columns (highlighted in yellow).

    Ex. In rows 1049 to 1050, 06291107430881 is linked with code QA and BH.

    The aim is to find the missing markets for a trade item number given in sheet System Data with respective to actual sheet Source Data.

    Ex. 06291107430881 should in actual have 4 codes linked i.e. KW, OM, JO and QA (as per Source Data) but in actual it has only 2 codes QA and BH linked. Out of the required 4 codes, it only has QA. So, the missing codes are KW, OM and JO.

    The results should be populated in sheet Result such that:

    1. Only the trade item number which has missing market should be populated in sheet Result
    2. The trade item number should be in 1st column
    3. The combination of markets in sheet source data i.e. KW, OM, JO and QA should be in column “Source Markets” separated by comma.
    4. The combination of markets in sheet System data i.e. QA and BH should be in column “System Markets” separated by comma.
    5. The difference of Source and System should be in column “Missing Markets” but only the ones missing in column “Source Markets”.

    Sample result given in sheet Result.

    Note:

    1. Its better to first sort column Trade Item Number. But when i do, the format changes and the zeroes prefixed are omitted. In short, column Trade Item Number will always be 14 digits.

    2. Sheet System Data might contain duplicate values in 2nd column. Also, sometimes values will only be in 2nd column and not 3rd column.

    Can someone please help with the code? Many thanks in advance.
    Attached Files Attached Files

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Match criteria and give result
    By rvr ramana in forum Excel General
    Replies: 10
    Last Post: 09-17-2019, 03:33 PM
  2. [SOLVED] Count or Sum If using 2 Criteria, and Give Result If Higher Than Zero
    By mrsdeapsleap in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 06-29-2017, 02:18 PM
  3. What formula do I require for two criteria to match in order to give result?
    By samuelleach in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 02-05-2015, 12:30 PM
  4. [SOLVED] Identify the pair and calculate the time difference if certain criteria match
    By Chippi in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 11-10-2014, 07:00 AM
  5. [SOLVED] Lookup multiple criteria in table and give row + culmn as result
    By bidsinga in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 04-02-2014, 03:40 PM
  6. [SOLVED] difference of values based on date and criteria
    By darkhangelsk in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 10-28-2013, 03:06 PM
  7. Multi criteria search result to give unique answer
    By redpis in forum Excel General
    Replies: 2
    Last Post: 08-13-2013, 04:05 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