I have a massive file (53,000+ rows) where I need to extract a “Record ID#” value that is contained within text. The attached screenshot shows the various ways the Record ID# value shows up in the Comments
End goal is column B in attached screenshot.
I can NOT use macros as I need to show/teach this using formulas or power query to others who need duplicate this in various ways to deal with similar data cleanup situations.
I couldn’t think of how to Power Query to solve this either. I essentially did the same as above- split values by “/”. But still had the issues mentioned above to proceed with further cleanup to isolate the Record ID#.
Thanks in advance for any help you can provide.
End goal is column B in attached screenshot.
I can NOT use macros as I need to show/teach this using formulas or power query to others who need duplicate this in various ways to deal with similar data cleanup situations.
- The only common delimiter is “2023/Archive/” everything else that follows ranges in length.
- The 10 character Record ID# always starts with a capital “D” followed by 9 digits OR a capital “D” followed by another capital letter then 8 digits.
- Most of the cells contain only 1 Record ID# in the Comments field.
- Some cells (A8 & A15) where Record ID# values are a range, the delimiter between the Record ID# range is Space/Dash/Space.
- Find & Replace “2023/Archive/” to reduce clutter
- Then Text to Column’ed which gave me upto 5 columns of data for each row depending on length of comment.
- The Record ID# value could be in Column 1,2,3,4 or 5. I’d sort each column & delete other “junk” values… very time consuming.
- Then I didn’t know how to “bring over” that Record ID# value in either Column 1,2,3,4 or 5 into a new Record ID# column.
- The other issue with Text to Column’ing are Comments value (see A8-A15) where the Record ID# is within a phrase and/or the Record ID# is listed as a range instead of a single value.
I couldn’t think of how to Power Query to solve this either. I essentially did the same as above- split values by “/”. But still had the issues mentioned above to proceed with further cleanup to isolate the Record ID#.
Thanks in advance for any help you can provide.