+ Reply to Thread
Results 1 to 10 of 10

Remove Empty Rows ,Columns & Sort

  1. #1
    Forum Contributor
    Join Date
    02-14-2010
    Location
    oman
    MS-Off Ver
    Excel 2003
    Posts
    384

    Post Remove Empty Rows ,Columns & Sort

    I have attached my sample sheet. my requirement's as bellow..

    01.row 2 is document header, but u can see some columns don't have data. so i want to delete that all the empty columns.

    02.As a my sample longest data column is column "B". B65 cell is the last data cell. from that cell to " Mean Average " row ,some empty rows are there. so i want to remove that empty rows up to one. i mean last longest data cell(in any column) & " Mean Average " rows in between should be only one empty row.

    03.after summarizing all the data columns, i want to sort all the available column's one by one in ascending.

    Sheet1 is my normal data & sheet2 is my expecting data.

    My data range is depend, so pls make macro for this. thanks in advance..
    Attached Files Attached Files
    Last edited by johncena; 02-18-2013 at 02:00 AM.

  2. #2
    Forum Expert
    Join Date
    07-15-2012
    Location
    Leghorn, Italy
    MS-Off Ver
    Excel 2010
    Posts
    3,431

    Re: Remove Empty Rows ,Columns & Sort

    Please Login or Register  to view this content.
    If solved remember to mark Thread as solved

  3. #3
    Forum Guru HaHoBe's Avatar
    Join Date
    02-19-2005
    Location
    Hamburg, Germany
    MS-Off Ver
    2013 on Win10 (desktop), 2007 on Win10 (notebook)
    Posts
    8,094

    Re: Remove Empty Rows ,Columns & Sort

    Hi, johncena,

    maybe like this:
    Please Login or Register  to view this content.
    Ciao,
    Holger
    Use Code-Tags for showing your code: [code] Your Code here [/code]
    Please mark your question Solved if there has been offered a solution that works fine for you

  4. #4
    Forum Guru jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Remove Empty Rows ,Columns & Sort

    Hi johncena

    This code accommodates this
    My data range is depend
    Please Login or Register  to view this content.
    John

    If you have issues with Code I've provided, I appreciate your feedback.

    In the event Code provided resolves your issue, please mark your Thread as SOLVED.

    If you're satisfied by any members response to your issue please use the star icon at the lower left of their post.

  5. #5
    Forum Guru Winon's Avatar
    Join Date
    02-20-2007
    Location
    East Rand, R.S.A.
    MS-Off Ver
    2010
    Posts
    6,077

    Re: Remove Empty Rows ,Columns & Sort

    @HaHoBe and jaslake,

    Great stuff guys!
    Please consider:

    Be polite. Thank those who have helped you. Then Click on the star icon in the lower left part of the contributor's post and add Reputation. Cleaning up when you're done. If you are satisfied with the help you have received, then Please do Mark your thread [SOLVED] .

  6. #6
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,379

    Re: Remove Empty Rows ,Columns & Sort

    Hi,

    I also wrote one:

    Please Login or Register  to view this content.
    Enhancement from reading Jaslake's code:

    Please Login or Register  to view this content.
    Last edited by xladept; 02-17-2013 at 03:02 PM.
    If I've helped you, please consider adding to my reputation - just click on the liitle star at the left.

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~(Pride has no aftertaste.)

    You can't do one thing. XLAdept

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~aka Orrin

  7. #7
    Forum Contributor
    Join Date
    02-14-2010
    Location
    oman
    MS-Off Ver
    Excel 2003
    Posts
    384

    Re: Remove Empty Rows ,Columns & Sort

    Quote Originally Posted by patel45 View Post
    Please Login or Register  to view this content.
    thanks a lot for your code. other than my second request your code is working perfectly.. pls check it. i want to remove empty rows also..

  8. #8
    Forum Contributor
    Join Date
    02-14-2010
    Location
    oman
    MS-Off Ver
    Excel 2003
    Posts
    384

    Re: Remove Empty Rows ,Columns & Sort

    Quote Originally Posted by jaslake View Post
    Hi johncena


    [/CODE]
    thanks lot for your code.it's not deleting empty columns.i mean if any column available only document header ,that all the columns should delete..( patel45 code doing it perfectly)

  9. #9
    Forum Contributor
    Join Date
    02-14-2010
    Location
    oman
    MS-Off Ver
    Excel 2003
    Posts
    384

    Re: Remove Empty Rows ,Columns & Sort

    Quote Originally Posted by xladept View Post
    Hi,

    I also wrote one:

    Please Login or Register  to view this content.
    Enhancement from reading Jaslake's code:

    Please Login or Register  to view this content.
    Thanks a lot friend, your code work perfectly.. thanks a lot again..

  10. #10
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,379

    Re: Remove Empty Rows ,Columns & Sort

    You're welcome!

+ 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