I have a data set that I am trying to edit. I have strings of numbers and characters. I have created an example below.
Raw data Clean data 757443V 757443V five RED 754520V#XY 754520V XY 267773AFL 267773A FL five RED 619979 619979 five RED MXQAGJ MXQAGJ one blue
I want to be able to ask excel if some criteria is meet make these changes.
If there are 6 numbers then a single character then add "five RED" to the end of the cell.
If there are 6 numbers then a character then a # then two characters substitute x with " ".
if there are 6 numbers and three characters then put in a space after the first character and add "five RED"
if just numbers then add "five red"
if just letters then add "one blue"
In my data set I have some data that doesn't conform to these rules, that is why I would like a specific code that only edits the data the meets a specific format. My data is quite large so I wont able to make a rule that states replace "AFL" with "A FL five RED". There are many combinations that have 6 numbers then three randomly selected characters. I would not be able to write a line for each unique combination.
This data is not an exact replication, so I would like to edit my data to fit this data set. I appreciate little explanation.
Bookmarks