A template for limit what is imported/

J

JohnnyJomp

Hi all...
I can import a product list from my unix database into Excel; once it is
there, I often want to delete many columns, as I have no use for them.
What I want to do is make a template or similar that will import (into a new
spreadsheet, if necessary) only certain columns. In other words, the original
spreadsheet is 30 columns, but I only need to work on 5 or 6; how can I tell
the new spreadsheet to just import the columns I need?

Thanks in advance!
John
 
V

Vasant Nanavati

Why not just copy the worksheet to a new sheet and delete the columns you
don't need?
 
J

JohnnyJomp

Hi...
That is easy enough to do, and is what I am doing, but as the columns are
not continuous (ie. columns B-AA), it takes a while to delete 20odd columns.
Just trying to speed up the process.
John
 
V

Vasant Nanavati

If they are always the same columns, a simple macro would delete them.

Sub DeleteUnwantedColumns()
Range("B:B,E:E,G:G").Delete
End Sub
 
J

JohnnyJomp

Excellent. I have never written a macro, so may be back for help again.
Thanks for the suggestion!
John
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top