Hello all,
Would appreciate help with a macro for this task that I do on a regular basis, but manually. I have an array of data with column headers that start with numerals and end with text (ex "01Attitude - Good"). The columns are in numerical order from left to right, going up to 49. I need a macro that inserts columns whenever there is a break in numeric sequence. In other words, if there are two columns next to each other that are named "16ABC" and "18XYZ", the macro would insert a column between them (creating a 'ghost' 17 column). Or if there were multiple numbers missing, e.g. "29ABC" and "32XYZ" next to each other, it would insert as many columns as necessary to correct the numeric sequence (in this case, two columns).
I've attached a document to show what I'm starting with. End result would be on the same sheet, but with inserted columns where the breaks are.
Thanks much,
Matt
Bookmarks