Hi all- I'm working on identifying financial accounts that might be 'Sample' accounts. I've been finding account numbers in my data like '123456' or '5678901' that I've confirmed with business users are indeed fictitious accounts used for testing purposes. What I would like to do is find a way to isolate the digits in these account numbers to test if they are sequential so I can review to see if they are testing/sample accounts.
I'm thinking there's probably something I can do in RegEx to help me but I'm not very experienced with RegEx and am unsure where to start. I'm sure there's also a macro solution, but am feeling a little stuck overall. I would love guidance/opinions on the best approach and how to get started. Thank you in advance!
Account Number (Input) | Is Sequential? (Desired Output) |
Z5160 | FALSE |
2345 | TRUE |
7890123 | TRUE |
012345 | TRUE |
12345678 | TRUE |
1589673 | FALSE |
987654 | TRUE |
Solved! Go to Solution.
@estherb47 , sure!!!
But seems like @DiegoParker owned us by far hahahahaha it took him 1318731 less tools than myself to accomplish the same.
@fmvizcaino @estherb47 @DiegoParker @MarqueeCrew Thank you all! I think these are all amazing solutions. This has been fun to think through, so I tossed the problem over to some of my colleagues as well and one of them came up with the solution below. Thought you might be interested to see yet another approach.
@kelsey_kincaid As you well said you could do the descending in the same formula using an OR statement.
@fmvizcaino It was just a bit of luck! it just happened that the previous day I had been researching for a blog post about string functions so I had the content very fresh 😛