+ Reply to Thread
Results 1 to 4 of 4

How to Remove Non-Contiguous Columns from Worksheet

Hybrid View

  1. #1
    sjane
    Guest

    How to Remove Non-Contiguous Columns from Worksheet

    I am new to using VBA in Excel. I am using Windows XP running Excel 2002. I
    have a .csv file which has been converted to Excel. I need to delete several
    columns that are non-contiguous, i.e., Columns A, B, D, G, H, I and M. In
    addition I need to format some of the columns in order to display their
    contents correctly. I was able to record a macro using the macro recorder
    and it works, but the macro runs very slowly. I there a more efficient way
    to accomplish these tasks? Any and all help appreciated. Thanks in advance.

  2. #2
    Bob Phillips
    Guest

    Re: How to Remove Non-Contiguous Columns from Worksheet

    Show us the code, and we can see.

    --
    HTH

    Bob Phillips

    "sjane" <sjane@discussions.microsoft.com> wrote in message
    news:93B3D5EF-088F-4A10-A22B-905B1545C9B3@microsoft.com...
    > I am new to using VBA in Excel. I am using Windows XP running Excel 2002.

    I
    > have a .csv file which has been converted to Excel. I need to delete

    several
    > columns that are non-contiguous, i.e., Columns A, B, D, G, H, I and M. In
    > addition I need to format some of the columns in order to display their
    > contents correctly. I was able to record a macro using the macro recorder
    > and it works, but the macro runs very slowly. I there a more efficient

    way
    > to accomplish these tasks? Any and all help appreciated. Thanks in

    advance.



  3. #3
    Jim Thomlinson
    Guest

    RE: How to Remove Non-Contiguous Columns from Worksheet

    It does not sound like you are too far off the mark. If the code works then
    post it and we can take a look at it. A few questions thought. How many lines
    of data in the CSV file? I understand that it could vary from file to file
    but a ball park estimate would be good. Do you have any formulas which refer
    to the data you are manipulating?

    "sjane" wrote:

    > I am new to using VBA in Excel. I am using Windows XP running Excel 2002. I
    > have a .csv file which has been converted to Excel. I need to delete several
    > columns that are non-contiguous, i.e., Columns A, B, D, G, H, I and M. In
    > addition I need to format some of the columns in order to display their
    > contents correctly. I was able to record a macro using the macro recorder
    > and it works, but the macro runs very slowly. I there a more efficient way
    > to accomplish these tasks? Any and all help appreciated. Thanks in advance.


  4. #4
    Nigel
    Guest

    Re: How to Remove Non-Contiguous Columns from Worksheet

    If you recorded a macro then it is probably inefficient, I suspect if you
    posted the code someone will adapt and speed it up for you.

    You might find just turning of screen updating might make it run fast
    enough.

    Put Application.ScreenUpdating = False at the beginning of you macro and
    Application.ScreenUpdating = True at the end.

    --
    Cheers
    Nigel



    "sjane" <sjane@discussions.microsoft.com> wrote in message
    news:93B3D5EF-088F-4A10-A22B-905B1545C9B3@microsoft.com...
    > I am new to using VBA in Excel. I am using Windows XP running Excel 2002.

    I
    > have a .csv file which has been converted to Excel. I need to delete

    several
    > columns that are non-contiguous, i.e., Columns A, B, D, G, H, I and M. In
    > addition I need to format some of the columns in order to display their
    > contents correctly. I was able to record a macro using the macro recorder
    > and it works, but the macro runs very slowly. I there a more efficient

    way
    > to accomplish these tasks? Any and all help appreciated. Thanks in

    advance.



+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1