• Delete/Condense Rows

    Author
    Topic
    #488321

    Hi, I created a table using an ARRAY. The array is awesome because I pulled the data that I needed however, I have a number of blank cells. If the cells were truly “blank” I could select F5, Select Blank Cells and delete. I’m stumped b/c these cells truly aren’t blank.

    Any suggestions on how to shift all relevant data together?

    File is attached.

    Viewing 1 reply thread
    Author
    Replies
    • #1380981

      Hi

      See attached file.
      Click button labelled [delete zero cells]

      zeddy

    • #1381001

      Once again Zeddy was faster! Here’s a slightly different approach you may find useful as it works on any selection vs having to change the programming for different ranges. HTH :cheers:

      33433-ab2537-ShiftCells

      May the Forces of good computing be with you!

      RG

      PowerShell & VBA Rule!
      Computer Specs

      • #1381081

        Hi RG

        I knew I could provoke you into providing a better solution.
        Top marks!

        zeddy

        • #1381082

          ..however, what about preserving the cell formatting????
          (see attached file, with your code)

          I believe the best solution would be..
          1. read the selected range block into an array
          2. then process the array in vba
          3. then write the modified array back to the sheet as values

          I believe this would then presrve the original cell formatting.

          zeddy

      • #1381102

        Thanks to both of you; I will try both approaches 🙂

    Viewing 1 reply thread
    Reply To: Delete/Condense Rows

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: