Finding keyword and Extracting text within brackets - search

I'm having a difficult time finding and extracting text that is contained within square brackets amongst other information contained within square brackets.
For example, this information is in Cell A1:
[adsfadfadsf] [a7dsfadfadsf] [a7] [a97containercheck23] [jk9043u9-dfkeo]
I'm trying to search for the keyword "check" and return what is within the square brackets "a97containercheck23"
I've tried to use wildcards to identify where the square bracket just before the text I'm looking for is located, so I can extract what I'm looking for. But it's not working.
=LEFT(MID(A1,SEARCH("[*check",A1),LEN(A1)),FIND("]",MID(A1,SEARCH("[*check",A1),LEN(A1))))

Related

Using the replace function in Netsuite for components in assemblies

Very new to Netsuite. I'm trying to use a saved item search to find all instances of {componentitem} entry is 800484 and replace them with component 516551302688
I'm using the REPLACE function in the saved item search but it doesn't like my formula REPLACE(800484, [, 516551302688]){componentitem}
I'm sure I am doing something wrong in the formula but unsure what it is.
The function signature for REPLACE is:
REPLACE(char, search_string, replacement_string)
char is the text to search in.
search_string is the text to search for.
replacement_string is the text to replace the search_string with, where found.
What you have appears to be more like
REPLACE(search_string, replacement_string)char
The text you want to search in is outside of the function altogether (outside the parentheses that enclose what the function will act on). You also have additional brackets and a comma in your formula.
Based you the information in your question, your formula should be
REPLACE({componentitem}, '800484', '516551302688')
I have wrapped the search and replacement strings in quotes as REPLACE deals with strings. If you leave the quotes off, the database will infer the string values of the numbers given and it will still work, but it's best practice to be explicit.
Note that this will only replace the values within the results of the saved search, and will have no effect on the underlying records. Hopefully you already know this, but I just mention it as the wording of your question makes it appear as if you're expecting it to substitute the actual components.
HTH.

How do I remove brackets with specific texts?

How do I replace specific text in brackets in excel? Would I use the replace function or the substitute function? I know this maybe a simple solution but I am pretty confused.
Please see example below. I am trying to remove brackets that contain (Number m).

Extract part of a string in excel

String:
"Department=Acc:2";"Classes=Accessoire";"Suppliers=xxx23";"Category=Décor";"Discount=no";Related_Carousel_Products=[23043]";"Accessory Type=Crinolines et Shorts";
My excel cells are filled with data like this and I want to extract a specific part of it, for example I would like to extract Accessory Type="Crinoline" into a new column so that I can edit them separately. I've tried this article it has many creative ways to extract the data but I cannot find a way to extract in the way I want, I want to extract part of the string, including the quotes.
https://www.extendoffice.com/documents/excel/3639-excel-extract-part-of-string.html
UPDATED - screenshot showing breakdown of each key function
You can do this using mid + search as follows (screenshot below/this sheet refer):
=MID(B2,SEARCH($F$2,B2),SEARCH(";",MID(B2,SEARCH($F$2,B2)+1,LEN(B2))))
where:
B2: the raw text
F2 = 'Accessory Type' (or any other thing you specify that satisfies final bullet)
Entire string you want to return (with or without quotation marks) falls after 'Accessory Type' and before the very next semi-colon (;) - per your example/below screenshot/above link.
How does this work?
We need to find the part of text that starts with the selected word(s) (e.g. "Accessory Type" in this case) and ends after the description of that accessory type (in this case, it's made up "asdfhadhgk")
Working from inside out mid function (A) returns everything after the words "Accessory Type"
Great, now we just need to it 'stop' a bit sooner, i.e. after the semi-colon that first appears after the words Accessory. This is exactly what the outer Mid function (D) achieves (it returns the string starting with "Accessory Type" up to the semi colon)
Screenshots below refer.

Unable to keep a certain portion from a text and kick out the rest

Is it possible to create any formula in excel to kick out any certain portion from a string and keep the rest? If I consider this a string Utopia(UTP), my expected output is UTP. To be specific: I would like to grab the bracketed portion and strip the rest.
These are the texts I would like to apply formula on:
Utopia(UTP)
Euphoria(EUPR)
Ecstasy(ECST)
The output I wish to have:
UTP
EUPR
ECST
FIND() will identify where a particular character first appears in a string. You can use this to find the parentheses in your text strings. Then plug those numbers into MID to extract the strings you want:
=MID(A2,FIND("(",A2)+1,FIND(")",A2)-FIND("(",A2)-1)

Trim text after Bracket in excel

I would like to trim off the text which is after the bracket in the cell Value
The current formula I'm using keeps giving me the error not being able to extract the targetted string.
=LEFT([#[Name ]],FIND("(",[#[Name ]]))
I want to go shopping (Today)
Goal: Is to remove
(Today)
Expected Result:
I want to go shopping
One of these should do.
=TRIM(LEFT([name], FIND("(", [name]&"(")-1))
=TRIM(REPLACE([name], FIND("(", [name]&"("), LEN([name]), TEXT(,)))
Note that I suffixed the original text with the character that the FIND is looking for. In this manner, it will always be found even if it is not in the original text.
You may find that you have a rogue trailing space in the Name header label.

Resources