Hi, we are trying to tidy up data off reports that we receive and there's a repititive task that I'm wondering if a macro could help with...
We have Raw Data on Sheet 1.
The data is is organised by column. It can sometimes be numbers, blanks, alphanumeric, a to z, A to Z, contains duplicates, differing LEN's etc.
(It really is a jumble - & hence why we are working on tidying it up!)
What we'd like to do is add a series of helper columns which will make it easier to feed into one of the other reports...
The helper columns would check if the "data cell" is blank, and if it is put the row number. EG "2"
And if the cells contains info, it would concatenate an underscore followed by the row number.EG "_2"
So for example if the formula entered in cell K2 is checking the info in cell J2:
#=IF(ISBLANK(J2),ROW(J2),CONCATENATE("_",ROW(J2)))
So as as cell J2 has info in it, it returns: "_2". (If it was blank, it would return "2").
The files we are working on have (currently) 110,000 rows of data and 35-ish columns.
Is there a way that a macro could:
i) generate a results sheet
ii) insert helper columns
iii) insert the helper formula (or something similar that would get the same result).
Thanks for any help you could provide. My fingers would be eternally grateful if they could avoid all of the copying, pasting and inserting columns that we are currently driving ourselves crazy with
All the best from a very chilly UK!
We have Raw Data on Sheet 1.
The data is is organised by column. It can sometimes be numbers, blanks, alphanumeric, a to z, A to Z, contains duplicates, differing LEN's etc.
(It really is a jumble - & hence why we are working on tidying it up!)
What we'd like to do is add a series of helper columns which will make it easier to feed into one of the other reports...
The helper columns would check if the "data cell" is blank, and if it is put the row number. EG "2"
And if the cells contains info, it would concatenate an underscore followed by the row number.EG "_2"
So for example if the formula entered in cell K2 is checking the info in cell J2:
#=IF(ISBLANK(J2),ROW(J2),CONCATENATE("_",ROW(J2)))
So as as cell J2 has info in it, it returns: "_2". (If it was blank, it would return "2").
mrexcel-02.xlsx | |||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | |||
1 | Sheet1-Raw-Data | line-ID | Data-Col-01 | Data-Col-02 | Data-Col-03 | Results-Sheet | line-ID | Data-Col-01 | Helper-01 | Data-Col-02 | Helper-02 | Data-Col-03 | Helper-03 | ||||
2 | 2 | each | choice | a | 2 | each | _2 | choice | _2 | a | _2 | ||||||
3 | 3 | d | 3 | d | _3 | 3 | 3 | ||||||||||
4 | 4 | car | option | 4 | car | _4 | option | _4 | 4 | ||||||||
5 | 5 | bus | 5 | bus | _5 | 5 | 5 | ||||||||||
6 | 6 | bus | 6 | bus | _6 | 6 | 6 | ||||||||||
7 | 7 | a | confirm | 7 | a | _7 | confirm | _7 | 7 | ||||||||
8 | 8 | 3 | 8 | 3 | _8 | 8 | 8 | ||||||||||
9 | 9 | 2 | 1 | 9 | 2 | _9 | 1 | _9 | 9 | ||||||||
10 | 10 | 1 | 1 | 10 | 1 | _10 | 10 | 1 | _10 | ||||||||
Sheet1 |
Cell Formulas | ||
---|---|---|
Range | Formula | |
K2:K10,O2:O10,M2:M10 | K2 | =IF(ISBLANK(J2),ROW(J2),CONCATENATE("_",ROW(J2))) |
The files we are working on have (currently) 110,000 rows of data and 35-ish columns.
Is there a way that a macro could:
i) generate a results sheet
ii) insert helper columns
iii) insert the helper formula (or something similar that would get the same result).
Thanks for any help you could provide. My fingers would be eternally grateful if they could avoid all of the copying, pasting and inserting columns that we are currently driving ourselves crazy with
All the best from a very chilly UK!