I have some data that looks like this (more than 400 columns) :
year | ID | fake_num1 | fake_num2 | text1 |
---|---|---|---|---|
2019 | 11 | 36 000 | 10'000 | text, 1 |
2020 | 12 | -1 275 | 1 000,00 | text 2 |
Columns fake_num1 and fake_num2 are stored as text. What I'm trying to achieve is
- Identify those fake numbers columns
- Clean the data (e.g. remove space, columns, replace comma by points) with a for loop
I need some help with step 1. I have to identify columns fake_num1 and fake_num2, while avoiding columns like text1. I was thinking of going with regexp but maybe there is another solution.
I used part of the code here: SO regexp, however I am not sure how to proceed from there.
Dim strPattern as String: strPattern = "^[0-9]$"
will find anything that starts and ends with a number, and only has numbers (if my comprehension is correct). What's the best way to manage the cases listed in the table above ?