I have a bear of a spreadsheet I need to format and massage on a monthly basis and I feel like you experts would have a better idea of how best to go about this.
I have a range of values that all need to ultimately end up looking like this: 060480 or 052447b <- 6 numeric values possibly followed a letter. Once I have them formatted, I need to sort them in order so that I can merge them into another spreadsheet.
Here're some examples of my original output:
1161
1174
1256_001
1257_001
1258_001
1259_001
12592_001
12601_001
12601a_001
12601b_001
12601c_001
12601d_001
12601e_001
12603_001
12603a_001
12603b_001
12649_001
1265_001
12683a_001
12683a_002
12683b_001
12683b_002
12683c_001
12683c_002
12683d_001
12683d_002
12683e_001
12683e_002
12703w_001
12703ww_001
12703x_001
12703xx_001
12703y_001
12703yy_001
12703z_001
12703zz_001
139
1390
13900_001
1472
1472_1
As you can see, it's really inconsistent. Values with _002 are secondary and the rows will be deleted entirely. Starting out, I could strip out everything after the underscores, but then I lose the information that lets me know that it's the secondary value (which I can get rid of later, but there's another column dependent upon my knowing that information).
The way I've been doing it has been to do a lot of manual sorting, but I have about 11,000 rows to do
So to sum up, the first part of the value, the numbers, needs to be 6 numbers, with leading zeroes. Then the alphabetic information needs to be spared.
I think I can start by deleting all of the _001s and _1s strings, then somehow deleting all rows that still retain an underscore (is there a formula or script for that?)
Once that is done, how do I get the numeric part of the value to 6 numbers?
I attached the spreadsheet I'm working on. Column B is dependent upon Column A, so all of my work is on Column B, and sorting, etc. is done on both columns together.
Any advice is greatly appreciated!
metadataformatting.xlsx
Bookmarks