+ Reply to Thread
Results 1 to 10 of 10

Cropping or Deleting useless data

  1. #1
    Registered User
    Join Date
    02-29-2016
    Location
    Asheville, NC
    MS-Off Ver
    2013
    Posts
    7

    Cropping or Deleting useless data

    I have a program that produces a spreadsheet that eventually shrinks to zero. IT repeats the zero until a gap and the repeats with the next set of information. The data sometimes uses 120/124 cells and sometimes uses 3/124 cells. I've abbreviated for illustration purposes. Is there a formula or set of formulas that I can utilize to select and copy the needed data to something that's more workable? The dots illustrate moving to the next cell.

    Row1..Unique Title
    Row2..some description
    Row3..Good stuff
    Row4..Good stuff
    Row5..6..10..2
    Row6..5..9..1
    Row7..2..8..0
    Row8..2..5..0
    Row9..1..3..0
    Row10..0.1..0..
    Row11..0..0..0
    Row12..0..0..0
    Row13..0..0..0 (This repeats for a long time until...124..0..0..0 or so then there is a break and new data that follows this pattern exists. If I add columns B,C,and D I only want to discard when the total is 0. So I want Rows 1-10 but not 11-124. There will then be unique title1 and a variable amount of rows with good data followed by the remainder of the 124 rows of all zeros. I know there is a way to get this information without having to manually select and delete the rows with all zero's. This is a hurdle I've not been able to get over for a while. Any suggestions are welcome.

  2. #2
    Forum Expert
    Join Date
    06-26-2010
    Location
    Austin, TX
    MS-Off Ver
    Excel 2010
    Posts
    1,673

    Re: Cropping or Deleting useless data

    Create a helper column in E that is something like this
    =OR(ISTEXT(B1),SUM(B1:D1))
    You can then sort the table by column E, and delete the block of FALSE values.
    Pauley
    --------
    If I helped with your issue, I'd appreciate a rep bump (hit the '*' icon to the bottom left of this post).

  3. #3
    Valued Forum Contributor
    Join Date
    08-22-2011
    Location
    Auckland
    MS-Off Ver
    Excel 2019
    Posts
    716

    Re: Cropping or Deleting useless data

    Here's a VBA way of doing it.
    The code as it is now only works with sheet 1. It deletes all the rows that are zero from column A to the last used column. I presumed all the data you want to keep is always at the top of a data block, and when the zero rows start, they are all zero rows until the last row of the block.
    Cheers

    Dropbox link coz the site is still broken
    https://www.dropbox.com/s/mx089pja2v...Rows.xlsb?dl=0

    Please Login or Register  to view this content.
    Attached Files Attached Files
    Last edited by Philb1; 03-08-2016 at 12:08 AM. Reason: Tried & failed to upload a sample file

  4. #4
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,929

    Re: Cropping or Deleting useless data

    Phil, looks like your file uploaded OK?

    Another way (maybe) to do this would be to use COUNTA() and COUNTIF(). Something like =IF(counta(A1:last-colum-1)=countif(A1:last-colum-1,0),"X","")
    then filter on that column for all X's - delete those rows (all in 1 go)
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  5. #5
    Valued Forum Contributor
    Join Date
    08-22-2011
    Location
    Auckland
    MS-Off Ver
    Excel 2019
    Posts
    716

    Re: Cropping or Deleting useless data

    Hi Ford

    I tried to check but the forum failed to load with an error of some sort. I read that you upload through the manage uploads link. I tried that & found no confirmation that the file was linked to the post. Tried to re-check the post but the site packed a sad & I gave up. Its been going on for so long now, are the tech team a bunch of 5 year olds?

  6. #6
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,929

    Re: Cropping or Deleting useless data

    Testing upload

    This was uploaded through "go Advanced"

    (Im using Chrome)
    Attached Files Attached Files

  7. #7
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,929

    Re: Cropping or Deleting useless data

    @! Phil, did you see this thread?
    http://www.excelforum.com/the-water-...accessing.html

  8. #8
    Valued Forum Contributor
    Join Date
    08-22-2011
    Location
    Auckland
    MS-Off Ver
    Excel 2019
    Posts
    716

    Re: Cropping or Deleting useless data

    No I hadn't see that post. What does please bring in our knowledge mean lol.

    I've tried firefox,edge,chrome & opera. None of them will upload the normal way via the go advanced button. I get a blank narrow slit of a window open up which lets me do nothing.

  9. #9
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,929

    Re: Cropping or Deleting useless data

    The owners and tech team are from India, many people have problems with english if it is not their native language

    I will pass this on to the tech team, thanks for the feedback

  10. #10
    Valued Forum Contributor
    Join Date
    08-22-2011
    Location
    Auckland
    MS-Off Ver
    Excel 2019
    Posts
    716

    Re: Cropping or Deleting useless data

    Say no more

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Snagit cropping / trimming
    By magijzel in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-06-2015, 07:34 PM
  2. [SOLVED] Cleaning up data for printing & deleting useless spaces
    By PaulLor89 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 03-01-2013, 04:08 PM
  3. cropping text
    By kuder in forum Excel General
    Replies: 3
    Last Post: 10-12-2011, 04:12 PM
  4. cropping an object with VBA
    By luv2glyd in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-19-2010, 12:13 PM
  5. Formulas won't enter into cells in Excel 2000 only as useless data
    By rebelkey in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 05-09-2006, 08:55 AM
  6. Cell cropping with a Macro or VB
    By Alastair79 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 04-18-2006, 08:45 AM
  7. [SOLVED] Cropping a worksheet
    By gord in forum Excel General
    Replies: 3
    Last Post: 08-23-2005, 05:05 PM

Tags for this Thread

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