Related Posts
Hello Brother's and Sister's ! I am looking for a senior manager/ process head / Delivery Manager at customer and technical service ! Total exp 15 years. Can anyone refer me! Looking for a change badly !HCL Technologies Amazon Tata Consultancy Deloitte Accenture Nagarro Newco Infy Infosys Amazon Web Services Amazon India Dell Genpact Tech Mahindra Wipro EY IGT Groupon CSS Corp American Express Bank of America BT British Telecom Cvent Telus International TaskUs Inc TeleperformanceFlipkart Google
Additional Posts in Excel Genius
why is index match superior to vlookup?
New to Fishbowl?
unlock all discussions on Fishbowl.
Assuming it's the same set of characters throughout
=left(refcell, search("characters", refcell)+-1)
I forget if the plus/minus 1 is entirely necessary though, can play around with it
Use a combination of mid,find and left. Find the second comma, find mg and pull everything in between
I’ve found examples on how to pull words and specific number of characters, but in my case that’s variable, and I’m looking to pull all the text that is ATTACHED (i.e: no spaces) to the characters I’m inputting
Specifically I’m working with a pharma database of several hundred thousand rows, and I want to make a column with the mg concentrations. The drug column is something akin to [Medicine name, capsules, 50mg x 30). I’m looking to pull the “50” or “50mg” into a separate, column. I can’t just pull the preceding 2 characters, since the concentration can also have 3+ characters (250mg, 2.5mg).
Excel may not be the best tool, I would use power query, sql, or tableau prep. To do it in excel, I think you can use a search function to find the comma, and wrap that in a left, mid or right function to grab the information you need. Lmk if you want me to try to write the formula out
Some combination of the wildcard characters may help:
Try this (O8 being the cell with the information in) =TRIM(MID(SUBSTITUTE(O8," ",REPT(" ",99)),99*(LEN(O8)-LEN(SUBSTITUTE(O8," ",""))-2),LEN(O8)))
Copy column
If it is always mg and a space after, find and replace “mg “ with unique character not in text “!” Or “$”
Run text to columns using unique character as delimiter
Last set of character in 1st column is value.
Use one of following to pull characters after last space
https://www.exceldemy.com/extract-text-after-last-space-in-excel/#6_Ways_to_Extract_Text_After_Last_Space_in_Excel
https://www.exceldemy.com/extract-text-after-last-space-in-excel/#6_Ways_to_Extract_Text_After_Last_Space_in_Excel
Assuming for now that the concentration levels are in column A: =( LEFT( A1, FIND ( "mg", A1) -1)) +0
Also can try flash fill
If a set of 4 characters
Say these are in col A
1234!?#€
756!?#€
=LEFT(a2,Len(a2)-4)
If the set of characters are the same this will return the numbers before it, based on the length of characters in the cell
Text to columns, use a delimiter of what you want to pull from