Results 1 to 6 of 6

Usage of for loop with increment in no particular order

Threaded View

  1. #1
    Registered User
    Join Date
    09-23-2011
    Location
    Calcutta
    MS-Off Ver
    Excel 2007
    Posts
    26

    Usage of for loop with increment in no particular order

    Hi,

    I need to delete a large number of columns that are in no particular order.

    I wish to write a for loop like this:

    For i = 1,3,7,12,13,14,18, 20 etc..
    Columns (i).Delete
    Next i
    Can someone suggest a looping to delete all these columns without having to type Column(x).delete for each x?
    Something like, where I could just type all the numbers at one place and use Column(x).delete in a loop?
    Last edited by drajanm; 11-21-2011 at 07:06 AM.

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