00:00If you have a data set and it's a mixture of both text and numeric value, and if you have to split text and numeric value into two separate columns, A and B, this is how you do it. Let's start with numeric. This is the formula to split text and numeric from this data set.
00:15Essentially, I'm using a filter function to do it. The first condition outlines the data set that I want to work on. The second one is your conditional for that filter. So basically, I'm checking if the data set is number. And this double minus minus means is a double unary operator, basically trying to convert this into numeric value and checking to see if that particular cell value is a number. If it's true, then I'll include that in the list.
00:45And this is what the list looks like. Now for the text, this is the formula. Okay, let's look at the text conversion formula here. Again, using the filter function. I'm using or defining the data set that I'm looking at. And the second condition, or the second argument is your condition itself. Let's look at it further here. So basically, we're looking and seeing if that particular cell is a text. If it's a text, like for example, battery, it will return a true value.
01:13And I'm taking that true value and multiplying with this is error function here. And inside, if you look at it, again, it's a double unary operator here, basically trying to convert this, say a particular cell into a number.
01:28And if you try to convert a string into a number, you know it's going to cause an error. So this is error will return to. So for example, if you take battery into consideration, the is text is true.
01:39And this trying to convert into a number will produce an error is true. That's why this is true. And then it will be included as part of your text.
Comments