Hi i cant seem to find a way to get below solution
lets say i have a list of text
Intel Xeon Processor E7-4807 6C (1.86GHz 18MB L3 95w 4S) (A123)
Intel Xeon Processor E7-4820 8C (2.00GHz 18MB L3 105w 4S) (B123)
Intel Xeon Processor E7-4830 8C (2.13GHz 24MB L3 105w 4S) (C456)
Intel Xeon Processor E7-4850 10C (2.00GHz 24MB L3 130w 4S) (D789)
Intel Xeon Processor E7-4860 10C (2.26GHz 24MB L3 130w 4S) (EFG456)
Intel Xeon Processor E7-4870 10C (2.40GHz 30MB L3 130w 4S) (ABC123)
i want to find a way to extract the codes in the brackets at the end of the text
expected output:
Intel Xeon Processor E7-4807 6C (1.86GHz 18MB L3 95w 4S) (A123) >> A123 << 4digit
Intel Xeon Processor E7-4820 8C (2.00GHz 18MB L3 105w 4S) (B123) >> B123
Intel Xeon Processor E7-4830 8C (2.13GHz 24MB L3 105w 4S) (C456) >> C456
Intel Xeon Processor E7-4850 10C (2.00GHz 24MB L3 130w 4S) (D789) >> D789
Intel Xeon Processor E7-4860 10C (2.26GHz 24MB L3 130w 4S) (EFG456) >> EFG456 << 6digit
Intel Xeon Processor E7-4870 10C (2.40GHz 30MB L3 130w 4S) (ABC123) >> ABC123
my concern is
1) i cant use =right(xxxx) function because it has inconsistent number of text within the bracket sometimes
2) i cant use search for "(" to extract the text there are other brackets within the text : for eg. (1.86GHz 18MB L3 95w 4S)
Last edited by yulia33; 09-29-2011 at 04:42 AM.
I have a question regarding the data that you need to be extracted. Does it always begin with alphabets?
Here, try this:
=TRIM(SUBSTITUTE(RIGHT(SUBSTITUTE(A1,"(",REPT(" ",255)),100),")",""))
"Relax. What is mind? No matter. What is matter? Never mind!"
Zbor,
Can you please explain this formula? Its a learning for all of us.
Thanks.
Nice. Took me a minute to figure it out, but correct me if I'm wrong but this will only work if the string needed is found after the last "(".
abousetta
Please consider:
Thanking those who helped you. Click the star icon in the lower left part of the contributor's post and add Reputation.
Cleaning up when you're done. Mark your thread [SOLVED] if you received your answer.
Let sa you have string xxxx0000(xx00)(xx00)(xx0000)
And you want to extract last word.
Reasons why you can do that with RIGHT function yulia33 said in first post.
So... Idea is to substitute ( with long string of spaces -> I will show here 10 underscores _
Form string: xxxx0000(xx00)(xx00)(xx0000)
with part: SUBSTITUTE(A1,"(",REPT(" ",10))
You get: xxxx0000_________xx00)_________xx00)_________xx0000)
Now you get RIGHT 15 characters from that string:
You'll get: ________xx0000)
Since _ are actually spaces you can remove them with TRIM function:
Remain: xx0000)
And last thing to get rid of ) which you can do with SUBSTITUTE like I did, or LEFT function.
Hope it's clear enough.. if not tell me for further explanation.
Edit: abousetta you are right. But that's what user asked to.
"Relax. What is mind? No matter. What is matter? Never mind!"
Hi zbor,
I agree and here's my 5 cents:
abousetta=SUBSTITUTE(RIGHT(A2,LEN(A2)-FIND(") (",A2)-2),")","")
Please consider:
Thanking those who helped you. Click the star icon in the lower left part of the contributor's post and add Reputation.
Cleaning up when you're done. Mark your thread [SOLVED] if you received your answer.
Hi abousetta,
That was nice. Could you please explain the function?
Thanks
thanks!
took some time to understand those.
now i have another issue. what if there are texts behind the last ")"
Intel Xeon Processor E7-4807 6C (1.86GHz 18MB L3 95w 4S) (A123)
Intel Xeon Processor E7-4820 8C (2.00GHz 18MB L3 105w 4S) (B123)
Intel Xeon Processor E7-4830 8C (2.13GHz 24MB L3 105w 4S) (C456)
Intel Xeon Processor E7-4850 10C (2.00GHz 24MB L3 130w 4S) (D789)
Intel Xeon Processor E7-4860 10C (2.26GHz 24MB L3 130w 4S) (EFG456) - text
Intel Xeon Processor E7-4870 10C (2.40GHz 30MB L3 130w 4S) (ABC123) [etc etc]
my output was:
A123
B123
C456
D789
EFG456 - text
ABC123 [etc etc]
any formula to count the length of strings before it has a space from the left function.
so i can extract the exact string regardless of its length there.
You want to extract without words after last ) ?
try this:
=TRIM(LEFT(SUBSTITUTE(RIGHT(SUBSTITUTE(A1,"(",REPT(" ",255)),100),")",REPT(" ",255)),100))
"Relax. What is mind? No matter. What is matter? Never mind!"
brilliant!
you made it looked so easy. i didn't think of that.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks