+ Reply to Thread
Results 1 to 2 of 2

How to delete cells ?

  1. #1
    Registered User
    Join Date
    06-21-2005
    Posts
    1

    Exclamation How to delete cells ?

    undefinedundefined

    Hi All,
    I would like to do the following column deletions programatically using VBA.

    In a Test.Xls file i have 5 columns and 8 rows. In the 5th column i don't have any data in last 2 rows i,e 7th and 8th rows. I need to delete the first 6 rows of Column A by shift cells left, so that the whole data in the Test.Xls will be accomodated into 4 columns and 8 rows.

    If Then, open an xxx.xls and then give me a solution.

    Thanks in advance
    suseee

  2. #2
    Valued Forum Contributor mudraker's Avatar
    Join Date
    11-10-2003
    Location
    Melbourne, Australia
    Posts
    3,983
    susee


    Try this one line macro

    Sub DeleteCells()
    Workbook("Test.xls").Sheets(1).Range("A1:A6").Delete Shift:=xlToLeft
    End Sub

+ 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