+ Reply to Thread
Results 1 to 6 of 6

Deleting a range of cells (rows and columns)

  1. #1
    Registered User
    Join Date
    03-14-2011
    Location
    Canada
    MS-Off Ver
    Excel 2007
    Posts
    6

    Deleting a range of cells (rows and columns)

    Hi,

    I want to delete a range of cells and columns in my file (eg. A1:K28) as soon as i open the file.

    Is there any way to do so ?

    Please help me.

    I have almost 20 files in which i have to enter data on daily basis. So everytime when i open the file i have to select all the cells mentioned above and delete the data manually. It is very tedious. I would like to have a macro which can delete all the cells mentioned in specific range on opening of that particular file.

    Thanks,
    Ketan.

  2. #2
    Valued Forum Contributor
    Join Date
    02-12-2011
    Location
    The Netherlands
    MS-Off Ver
    365
    Posts
    818

    Re: Deleting a range of cells (rows and columns)

    In ThisWorkbook.
    Please Login or Register  to view this content.
    Makes the cells blank

    Or:
    Please Login or Register  to view this content.
    Remove all cells
    Kind regards, Harry.

  3. #3
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,483

    Re: Deleting a range of cells (rows and columns)

    please supply more detail.

  4. #4
    Registered User
    Join Date
    03-14-2011
    Location
    Canada
    MS-Off Ver
    Excel 2007
    Posts
    6

    Re: Deleting a range of cells (rows and columns)

    Hi Harry,

    Can you please tell me where should i write this code in my file. (sorry i am not familiar with excel at all !)

    Thanks
    Ketan

  5. #5
    Registered User
    Join Date
    03-14-2011
    Location
    Canada
    MS-Off Ver
    Excel 2007
    Posts
    6

    Re: Deleting a range of cells (rows and columns)

    Hi Dave,

    Sorry if i am not very clear, as this is the first time i am using any kind of forums.

    I want to clear the contents of a specific data field as soon as i open the excel file, so that i can enter new data in place.

    My file has following columns:

    Name Tag # Hanger Qty. Package Qty Rate Tax Final Amt.

    Tax and Final amt are calculated automatically and rest of the columns i have to fill on daily basis.

    So i want a macro by which i can clear the contents of following columns on daily basis :

    Name Tag # Hanger Qty. Package Qty



    Thanks,
    Ketan.

  6. #6
    Valued Forum Contributor
    Join Date
    02-12-2011
    Location
    The Netherlands
    MS-Off Ver
    365
    Posts
    818

    Re: Deleting a range of cells (rows and columns)

    Ketan,

    Do all of this in a test file, for sure.

    Press Alt+F11.
    On the left side you see 'ThisWorkbook'.
    Give it a doubleclick, and paste de code under 'Option Explicit'.
    Press Alt+F11 or Alt+Q to close VBA.

    Save en reopen the file.

+ 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