Forum Discussion

RodelioF's avatar
RodelioF
Copper Contributor
Nov 23, 2024

Excel Formula

Good day to all!

 

Please help me on my project. I want to create an excel formula that comes out on this situation below: 

Column A & B is a given data.

Then Column E is the value/text which need to find on column B base on the headers.

Then Column F is the column that I wanted to have a formula that indicates match or not match base on Column E situation. 

Please the files. Thank you!

 

 

7 Replies

  • peiyezhu's avatar
    peiyezhu
    Bronze Contributor

     

    Online sql:

    //select * from Sheet2;

    create temp table aa as 

    select udf_fillna_m(iif(instr(f01,' class ')>0, regexp2('class\s*(.+)',f01,1),''),'a') class,udf_fillna_m(iif(instr(f01,' subclass ')>0, regexp2('class\s*(.+)',f01,1),''),'b') subclass,* from Sheet1;

    create temp table bb as 

    select class,subclass from aa where instr(f01,'subclass') group by class,subclass;

     create temp table cc as 

    select rowid as old_rowid,udf_fillna_m(iif(((lag(f01) over() is null or lag(f01) over() like '') and f01 not like ''),f01,''),'c') Class,* from Sheet2;

    create temp table dd as 

    select cc.class,cc.f01 'Class/Subclass',iif(bb.subclass is null,'NOT MATCHED','MATCHED') Status from cc left join bb on cc.class like bb.class and cc.f01 like bb.subclass where cc.class!=cc.f01 and cc.f01 !='' group by cc.class,cc.f01 order by old_rowid;

    cli_merge_row~dd~1;

  • May consider this:

     

    1. Set Up the Formula:
      • In Column F, use the following formula to check for a match:
      • excel
      • =IF(ISNUMBER(MATCH(E1, B:B, 0)), "Match", "No Match")
      This formula works as follows:
      • MATCH(E1, B:B, 0): Looks for the value in E1 within Column B.
      • ISNUMBER(): Checks if the result of the MATCH function is a number (indicating a match).
      • IF(): Returns "Match" if a match is found, otherwise returns "No Match".
    2. Drag the Formula Down:
      • After entering the formula in cell F1, drag it down to apply it to all cells in Column F where you need the check.

    With this setup, Column F will automatically indicate whether the value/text in Column E is found in Column B.

    • RodelioF's avatar
      RodelioF
      Copper Contributor

      Thank you, the formula is working however I want to automatic find the subclass base on its class. (PACKAGE GEOMETRY, REF DES, BOARD GEOMETRY) like the photo below.

       

    • RodelioF's avatar
      RodelioF
      Copper Contributor

      I'm so sorry, I will make it simple. CSSUmueje 

       

      Column A & B are the given data.

      Column E and F are the text that needs to find on Column A and B. I want to automatic find the subclass base on its class. (PACKAGE GEOMETRY, REF DES, BOARD GEOMETRY)

      Column G will show the results if the text if found or not.

      Kindly see the file.  If not yet clear just let me know. Thank you!

       

      • SnowMan55's avatar
        SnowMan55
        Bronze Contributor

        See the attached workbook for multiple formulas (that locate a Class's range, look for a match within the range, offer hyperlinks to get to a Class/Subclass).  Be sure to read the _Info worksheet.

Resources