Forum Discussion
zayn_mir
Feb 15, 2023Copper Contributor
Excel Formulas
Hi, I need a formula which can extract specific data from a column e.g (xyz, abc) irrespective of the positioning of the data and the number of times the data is entered in that cell.
Patrick2788
Feb 17, 2023Silver Contributor
You might consider using functions like TEXTBEFORE, TEXTAFTER, and TEXTSPLIT, if available in your version. It's difficult to recommend a specific formula without an example.
zayn_mir
Feb 17, 2023Copper Contributor
Thank you for responding to my query guys. What I want is that if cell A1 has some data e.g. (TTT, LLL,MMM,AVA), I want a formula in cell B1 that takes this data from Cell A1 ( irrespective of the positioning of the data or even if two datas (LLL, AVA) are both populated in Cell A1) and copy only that specific data e.g. (TTT, LLL,MMM,AVA) to Cell B1.
- Patrick2788Feb 17, 2023Silver Contributor
Maybe this:
=LET(str,IF(ISNUMBER(SEARCH(terms,A1)),terms,""),TEXTJOIN(", ",,str))
If case sensitive use:
=LET(str,IF(ISNUMBER(FIND(terms,A1)),terms,""),TEXTJOIN(", ",,str))
- zayn_mirFeb 20, 2023Copper ContributorThank you for providing the formula. Can this formula be used for 15 Terms as the formula you provided can only be used for 4 terms. Moreover does this formula work on Google Sheets as I am unable to implement it on Google Sheets.
- Patrick2788Feb 20, 2023Silver Contributor
This formula can be scaled to include 15 terms by updating the named item 'terms'. I don't use Google sheets so I can't comment on if the formula would work in that app.