I have a CSV file in which I have lots of empty columns. I have Ms Excel 2010 but, I don’t know how to use Macros or sort functions.
I already did a Google search and followed the steps. They didn’t help me. Can someone guide me through step by step process for deleting empty columns?
Edited:
Sorry, I didn’t know how this site works. It was hard for me to go through my web search history to find out the proper links as I have been searching all day.
But I have some links from my history that were helpful for similar people like me (but not me :()
http://www.addictivetips.com/windows-tips/how-to-delete-remove-blank-rows-columns-in-excel-2010-spreadsheet/
http://www.mrexcel.com/archive/VBA/11225.html
Here’s a macro that will go through all columns, from the last one with any data in it to the first, and delete any columns that have nothing in them:
In addition: it won’t crash if there’s nothing at all in the sheet, and you don’t have to limit yourself to a certain number of columns, it’ll check all of them automatically.
EDIT: Modified to skip the first row and ignore any headers.