+ Reply to Thread
Results 1 to 5 of 5

Write a formula for table with duplicate values in Column A

  1. #1
    Registered User
    Join Date
    08-09-2018
    Location
    Germany
    MS-Off Ver
    2016
    Posts
    3

    Write a formula for table with duplicate values in Column A

    Hey guys, I am trying to solve the following problem.

    I have attached my file with this post.
    I have written an IF Statement in Column D(Result) according to the Dispatch and Production Status (Column B,C).
    My problem is, some Order nos. in the Column A are repeated and are having different status.

    I want to have a result as shown in Column E.

    If a order no. has a mixed status of "normal" or "dispatch good job", it is not a problem.

    But if a order no. has a status "normal" or "dispatch good job" and also has anyone of one the status "Dispatch at fault" or "produktion at fault", the result for the order no. should show "Mixed"

    for eg Order 2,11,13.

    Your help would be much appreciated.
    Attached Files Attached Files

  2. #2
    Forum Expert dflak's Avatar
    Join Date
    11-24-2015
    Location
    North Carolina
    MS-Off Ver
    365
    Posts
    7,920

    Re: Write a formula for table with duplicate values in Column A

    I worked this one out with some helper columns.

    First I converted the data into an Excel Tables because Excel tables know how big they are so when you add data, you do not have to change anything.

    The helper columns are Negative, Positive and New Result

    Negative =COUNTIFS([Order no.],[@[Order no.]],[RESULT],"Prod at fault ")+COUNTIFS([Order no.],[@[Order no.]],[RESULT],"Dispatch at Fault") which counts the negative findings.
    Positive =COUNTIFS([Order no.],[@[Order no.]],[RESULT],"Normal")+COUNTIFS([Order no.],[@[Order no.]],[RESULT],"Dispatch good job") which counts the positive findings

    New Result =IF(AND([@Negative]>0,[@Postive]>0),"Mixed",[@RESULT]) which is mixed if there is at least 1 negative and 1 positive - otherwise use the original result.
    Attached Files Attached Files
    One spreadsheet to rule them all. One spreadsheet to find them. One spreadsheet to bring them all and at corporate, bind them.

    A picture is worth a thousand words, but a sample spreadsheet is more likely to be worked on.

  3. #3
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,926

    Re: Write a formula for table with duplicate values in Column A

    Hi, welcome to the forum

    Here is a shortened vesrion of your formula...
    =IF($C2="Good",IF($B2="Good","Normal","Dispatch at fault"),IF($B2="Good","Dispatch good job","Prod at fault "))

    Now, you mention "has anyone of one the status "Dispatch at fault" or "produktion at fault" yest in your dropdown for the 2 status's, you only have Good or Bad?
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  4. #4
    Registered User
    Join Date
    08-09-2018
    Location
    Germany
    MS-Off Ver
    2016
    Posts
    3

    Re: Write a formula for table with duplicate values in Column A

    Hi dflak, thanks for your help. Worked perfect

  5. #5
    Registered User
    Join Date
    08-09-2018
    Location
    Germany
    MS-Off Ver
    2016
    Posts
    3

    Re: Write a formula for table with duplicate values in Column A

    Hi FDibbins, sorry for the confusion...I meant the "RESULT" Column (Column D).

+ 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] Formula that looks up totals from a column with duplicate values in
    By Aqua_Paul in forum Excel General
    Replies: 3
    Last Post: 02-01-2018, 12:41 PM
  2. Formula to find duplicate values in one column
    By Dogmia78 in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 08-18-2016, 04:42 PM
  3. detecting duplicate values in a column (values are made of formula)
    By louiemangaring in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-12-2015, 06:25 AM
  4. Replies: 4
    Last Post: 02-18-2015, 10:03 AM
  5. Look up for duplicate values in column table
    By boboivan in forum Excel General
    Replies: 2
    Last Post: 01-28-2015, 07:18 AM
  6. Replies: 0
    Last Post: 09-11-2013, 09:54 AM
  7. [SOLVED] Vlook up when duplicate values in the array table and lookup column
    By vinodt in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 10-02-2012, 10:28 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