+ Reply to Thread
Results 1 to 4 of 4

Delete auto incrementing column in Excel sheet?

  1. #1
    Registered User
    Join Date
    04-16-2012
    Location
    US
    MS-Off Ver
    Excel 2003
    Posts
    15

    Delete auto incrementing column in Excel sheet?

    Hi,

    I m pulling data from .iqy file to Excel sheet. While doing that, It not only fetches my data from iqy file but also adds ID column in Excel which is auto incrementing. How do I get rid of that ID column which is autoincrementing column in my excel sheet?

    Here's my code along with screenshot that shows auto incremented column iD which I want to get rid of.
    Delete AutoIncrementingCol.JPG

    Please Login or Register  to view this content.

  2. #2
    Forum Contributor
    Join Date
    05-04-2012
    Location
    Stamford,Connecticut,USA
    MS-Off Ver
    Excel 2003
    Posts
    105

    Re: Delete auto incrementing column in Excel sheet?

    Add this before End Sub

    Range("A1").EntireColumn.Delete

  3. #3
    Registered User
    Join Date
    04-16-2012
    Location
    US
    MS-Off Ver
    Excel 2003
    Posts
    15

    Re: Delete auto incrementing column in Excel sheet?

    Hi RaulRodriguez,

    I got Run time error 1004
    Delete method of Range class failed.

  4. #4
    Forum Contributor
    Join Date
    05-04-2012
    Location
    Stamford,Connecticut,USA
    MS-Off Ver
    Excel 2003
    Posts
    105

    Re: Delete auto incrementing column in Excel sheet?

    Try adding the worksheet name Worksheets("Sheet1").Range("A1").EntireColumn.Delete

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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