Forum Discussion
RodelioF
Nov 23, 2024Copper Contributor
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!
- peiyezhuBronze 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:
- 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")
- 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".
- 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.
- RodelioFCopper 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.
- Set Up the Formula:
- CSSUmuejeCopper Contributor
I don't get the explanation
- RodelioFCopper 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!
- OliverScheurichGold Contributor
An alternative could be Power Query. In the attached file you can add data to the blue dynamic table. Then you can click in any cell of the green table and right-click with the mouse and select refresh to update the green result table.
In my opinion the green result table is easier for further analysis than the table in columns E-G in your screenshot.
In the attached file in sheet "Tabelle2" there is a suggestion which should be more similar to your actual database.