+ Reply to Thread
Results 1 to 3 of 3

A formula to solve my Code problem

  1. #1
    Registered User
    Join Date
    05-22-2018
    Location
    Turkey
    MS-Off Ver
    MS Office Professional Plus 2016
    Posts
    2

    A formula to solve my Code problem

    Hi all,

    I have a table like in the picture

    And also I tried to copy paste below

    Pro_code are my products and on the rows starting from A to E are my raw materials

    At new column I want to create an unique code that will show which RM's that my products are using

    For instance i distinct counted rm's for Product 1 and the product using RM A and RM C so new column should make a code named A_C

    What kind of formula should i proceed?

    PRO_CODE A B C D E New Column
    2.39.06.030 1 1 A_C
    2.39.06.031 1 1 1 A_B_C
    2.39.06.032 1 C
    2.39.06.033 1 1 B_C
    2.39.06.034 1 E
    2.39.06.036 1 C




    Capture.PNG

  2. #2
    Forum Expert
    Join Date
    06-08-2012
    Location
    swindon, england
    MS-Off Ver
    Excel 2019 / Windows 10
    Posts
    4,567

    Re: A formula to solve my Code problem

    If it is as simple as 5 columns then something like

    =SUBSTITUTE(TRIM(IF(N(B2),B$1&" ","")&IF(N(C2),C$1&" ","")&IF(N(D2),D$1&" ","")&IF(N(E2),E$1&" ","")&IF(N(F2),F$1&" ",""))," ","_")

    If, in reality you have a lot more columns to work with then you might be better to look at a UDF like ACONCAT

    I think that office 365 includes a similar function, but other versions do not, you would need to add it as a custom function.

  3. #3
    Registered User
    Join Date
    05-22-2018
    Location
    Turkey
    MS-Off Ver
    MS Office Professional Plus 2016
    Posts
    2

    Re: A formula to solve my Code problem

    Works perfectly,

    Thank you so much

+ 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