4 ms·
So the task is to remove all alpha chars from a column containing strings of alphanumerics? I applaud the author's inventiveness to writing complex formulas an
by kjellsbells 4y ago
So the task is to remove all alpha chars from a column containing strings of alphanumerics?
I applaud the author's inventiveness to writing complex formulas and cranking out some VBA, but this is job for sed: copy the column to a text file, sed to strip out alphas, copy back, done.
- CamperBob2 4y agoNow watch somebody earn a $8B market cap on sed As A Service...
- dmitriid 4y agoParapgraph two. I advise you to read it: --- start quote --- There are a few ways you can approach this problem. Before proceeding with any solution, however, you should make sure that you aren't trying to change something that isn't really broken. For instance, you'll want to make sure that the "E" that appears in the number isn't part of the format of the number—in other words, a designation of exponentiation --- end quote ---
- kjellsbells 4y agoFair enough, although that's also trivially easy to account for. I guess all Im saying is that when I see complex Excel formulas and VBA I see frustration and a ticking clock, and my preference to avoid that is to reach for simpler tools. But I appreciate that is not everyone else's default reaction. Maybe ppl see sed and run screaming...
- emehex 4y agoI think the venn diagram of excel and sed users is smaller than imagined...
- ALittleLight 4y agoI think this is only true because the circle of sed users is pretty small. Excel is pretty useful for many things. I'm constantly throwing data in Excel to reason with it and graph it. Assuming that there are many columns and I only wanted to remove the data from one I personally would find it more difficult and awkward to write a sed command to do this than the three or four lines of Python it would take (open the file in pandas, insert a new column where the values are the numbers from the old column, save as csv/xlsx).