Imagine this: you receive raw data for analysis and find out that numbers are mixed with text in one column. In most cases, it will certainly be more convenient to have them in separate columns for closer examination. Continue reading
by Svetlana Cheusheva, updated on
Imagine this: you receive raw data for analysis and find out that numbers are mixed with text in one column. In most cases, it will certainly be more convenient to have them in separate columns for closer examination. Continue reading
Table of contents
Comments page 2. Total comments: 52
Hi, I'm using the RemoveText custom function but it doesn't preserve decimals. For example, 950.43 becomes 95043. Is there a way to save the decimals?
Hello!
The comma is considered a character, not a number. Therefore, it must be added to the list of symbols that are not removed.
VBA code 2:
.Pattern = "[^0-9\,]"
You can also use regular expressions to remove specific characters from text. Here is a detailed instruction: Excel Regex to remove certain characters or text from strings.
In the RegExpReplace function, use the pattern "[^0-9\,]"
Thanks! That worked perfectly!
Hello,
It's the perfect solution. How to make an empty cell for the blank cell? Since we drag the formula down, the empty cell grabs some wired string and special character.
Thank you!
Hi Evan,
Nest your formula in the IF function like this:
=IF(A2="", "", your_formula)
Where A2 is the cell with the original data.
Hi Svetlana,
This is such a cool example; thank you for providing it. In my data I am trying to pull out numeric value from my text which is listed for example as 70 MPH. There could be other numeric values after the MPH but I dont want those. Can this formula be adjuster to only pull the numberic value before MPH? Thanks!
Hi Jodi,
If you are looking for a universal solution that can pull number before any text, please see How to extract number from the beginning of text string.
Hello!
Try to substitute this expression in the formula instead of A2:
LEFT(A2,SEARCH("MPH",A2)-1)
I hope it’ll be helpful.
Hi Svetlana,
what is the software you use to highlight your images in all your articles?
Kind regards
Hi Sukumar,
It's FastStone Capture.
Thank you
Regards