+ Reply to Thread
Results 1 to 5 of 5

Deleting Rows based on certain criteria in Large Excel File

  1. #1
    Registered User
    Join Date
    02-02-2022
    Location
    Boston
    MS-Off Ver
    11
    Posts
    3

    Question Deleting Rows based on certain criteria in Large Excel File

    Hello,

    I am currently working with a large excel file (currently about 54,000 rows). I am working with data points, and they are measured by the second, while I only need data points for once every minute. I have an elapsed time column that is measured in seconds.

    Is there a way to quickly filter out or delete every row for which the elapsed time is not a multiple of 60? I am only seeing how to delete rows based on a single value in other forums. I'd think a macro might work for this, but I am not too familiar with writing those at the moment.

    Any advice is appreciated!

  2. #2
    Forum Expert WideBoyDixon's Avatar
    Join Date
    10-03-2016
    Location
    Sheffield, UK
    MS-Off Ver
    365
    Posts
    2,182

    Re: Deleting Rows based on certain criteria in Large Excel File

    Add a new column with a formula similar to this:

    Please Login or Register  to view this content.
    Change the column to be the column that contains that elapsed time. Copy the formula down for all rows then filter the data for this new column value being FALSE. Select all the filtered rows and delete them. Then unfilter the data. You can also delete the new helper column if you wish.

    You could do it with a macro but these few simple steps will help you avoid it.

    WBD
    Office 365 on Windows 11, looking for rep!

  3. #3
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,428

    Re: Deleting Rows based on certain criteria in Large Excel File

    Fast answers need visual help. Please read the yellow banner at the top of this page on how to attach a file.
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  4. #4
    Registered User
    Join Date
    02-02-2022
    Location
    Boston
    MS-Off Ver
    11
    Posts
    3

    Re: Deleting Rows based on certain criteria in Large Excel File

    Thanks that works great!

  5. #5
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010, 2013
    Posts
    7,820

    Re: Deleting Rows based on certain criteria in Large Excel File

    Try this macro. It assumes the elapsed time is in column A. Change the column letter (in red) to suit your needs.
    Please Login or Register  to view this content.
    You can say "THANK YOU" for help received by clicking the Star symbol at the bottom left of the helper's post.
    Practice makes perfect. I'm very far from perfect so I'm still practising.

+ 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. Deleting rows based on criteria
    By nekmat97 in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 08-24-2018, 06:26 AM
  2. Excel File still large after deleting everything
    By XeRo13g in forum Excel General
    Replies: 21
    Last Post: 05-17-2018, 06:34 AM
  3. [SOLVED] Deleting rows based on two criteria
    By safesearcher in forum Excel - New Users/Basics
    Replies: 5
    Last Post: 01-31-2013, 12:54 PM
  4. Deleting rows based on criteria
    By mcmuney in forum Excel General
    Replies: 6
    Last Post: 06-13-2011, 03:31 PM
  5. VBA for deleting rows not based on criteria
    By reggie1000 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-27-2009, 10:20 AM
  6. deleting rows based on criteria
    By scubadude47 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 11-14-2008, 01:53 PM
  7. Deleting Rows based on criteria...
    By neilcarden in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 01-09-2007, 05:23 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