I know this thread has been closed, but I am keen to know and understand why Mrice’s has not worked.
I think the reason could be this line of code:
If step over the code using F8, assuming n as long shows one column only, despite there are appear to be over 30 columns. The code looks at cells(1,1) and ends as it could not find any word which matches with the select case. To test it, I have added "ZipCode" in to the case statement and run the code. It deleted column “A” as the code find "ZipCode" in cells(1,1).
I have also run some msg box
N returns 8
So, the question is why the code returns a single column? Is it because the columns are merged in to one column, i.e. Column “A”?
I also run unmerge code and there is none.
May be as a newbie to VBA, I still do not understand how the last columns work.
I had expected
Row should show the last row and
should also shows the last column.
Back to the drawing board then!
Bookmarks