+ Reply to Thread
Results 1 to 7 of 7

Macro To Delete Some Columns

  1. #1
    Forum Contributor
    Join Date
    12-20-2012
    Location
    Qatar
    MS-Off Ver
    Excel 2010
    Posts
    171

    Macro To Delete Some Columns

    hi

    please i want ur help, check the attached two files.

    i need a macro (pop up message) to let me select which row i want then to hide all columns which total = zero

    for example to run the macro in before.xlsx file then the pop up message will let me choose which row, which is row no. 12, after i select the row, i will click a button for example to hide all columns which total is zero, (which they are D & H).

    thanks
    Attached Files Attached Files

  2. #2
    Valued Forum Contributor
    Join Date
    02-09-2012
    Location
    Mauritius
    MS-Off Ver
    Excel 2007
    Posts
    1,055

    Re: Macro To Delete Some Columns

    Hi

    The row with "Total", will that be always at the end?
    Click *, if my suggestion helps you. Have a good day!!

  3. #3
    Valued Forum Contributor
    Join Date
    02-09-2012
    Location
    Mauritius
    MS-Off Ver
    Excel 2007
    Posts
    1,055

    Re: Macro To Delete Some Columns

    Check this code:

    Please Login or Register  to view this content.
    Attached Files Attached Files

  4. #4
    Forum Contributor
    Join Date
    12-20-2012
    Location
    Qatar
    MS-Off Ver
    Excel 2010
    Posts
    171

    Re: Macro To Delete Some Columns

    hi, yes it is always at the end, i tried to copy the button code to another book but it doesn't work, teeling me that check.xlsx is not found.
    how to copy it, and i see that there are two codes, one as macro 1 and one as the button.

    please advise.
    thanks.

  5. #5
    Valued Forum Contributor
    Join Date
    02-09-2012
    Location
    Mauritius
    MS-Off Ver
    Excel 2007
    Posts
    1,055

    Re: Macro To Delete Some Columns

    Copy the button code on to the code window of the sheet where the button is present. Delete the macro 1 code.

  6. #6
    Forum Contributor
    Join Date
    12-20-2012
    Location
    Qatar
    MS-Off Ver
    Excel 2010
    Posts
    171

    Re: Macro To Delete Some Columns

    thanks a lot

  7. #7
    Forum Contributor
    Join Date
    12-20-2012
    Location
    Qatar
    MS-Off Ver
    Excel 2010
    Posts
    171

    Re: Macro To Delete Some Columns

    Jraj

    Ur macro is working very good, but if there is a lot of columns to be deleted will not work perfectly, i mean that i have to run the macro many times to delete all column

    Could u plz help

    Thanks

+ 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