+ Reply to Thread
Results 1 to 7 of 7

Delete rows in A-I, if time/date in G do not match those in P

  1. #1
    Registered User
    Join Date
    09-08-2012
    Location
    Panama, Panama
    MS-Off Ver
    Excel 2010
    Posts
    7

    Delete rows in A-I, if time/date in G do not match those in P

    Hey everyone,

    Have I got a brainteaser for you! I'm trying to figure out a macro that will:

    1) Scan the time/dates in column P
    2) Scan the time/dates in column G
    3) If the time/dates in column G don't match those in P, then delete the rows from column A-I.

    Attached is a sample of the data.
    This is exif data pulled from camera traps. Columns A-I represent single photos, and K-P are photo sequences (which are typically 10 photos, but can vary). For some reason the temp data in the sequences didn't save to the database, so I have to manually add it. The red column is just to help visually separate photo data from photo set data. There are about 14,000 individual photos, and I'm a bit pressed on time. Any help will be fantastic and +feedback will be given.

    Thanks,
    Zwelty
    Attached Files Attached Files
    Last edited by zwelty; 09-09-2012 at 08:13 PM.

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

    Re: Delete rows in A-I, if time/date in G do not match those in P

    Hi zwelty,

    This clears the whole thing - is the data typical, are there different instructions?

    Please Login or Register  to view this content.
    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

  3. #3
    Registered User
    Join Date
    09-08-2012
    Location
    Panama, Panama
    MS-Off Ver
    Excel 2010
    Posts
    7

    Re: Delete rows in A-I, if time/date in G do not match those in P

    Hey xladept,

    Thanks for the quick reply!

    So your macro works, but only if the date/times in P & G are in the same row. I also realized the data sample I sent wasn't
    very helpful, so attached a new one (Sample3.xlsx). The end result should look like the highlighted portions of the worksheet. Below the highlighted bits is how the data currently looks.

    For example, referencing Sample3.xlsx, the date/time in G5 & P5 match, but P6 only matches G15, so I need to delete everything in cells A6-I14, and move the cells up so in the end P6 & G6 also match, then continue this through the entire worksheet.

    I hope that clarifies things a bit, and you've already wooed me with your initial response.

    Zwelty
    Attached Files Attached Files
    Last edited by zwelty; 09-09-2012 at 05:54 PM. Reason: Updated worksheet/info

  4. #4
    Registered User
    Join Date
    09-08-2012
    Location
    Panama, Panama
    MS-Off Ver
    Excel 2010
    Posts
    7

    Re: Delete rows in A-I, if time/date in G do not match those in P

    *Love bump

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

    Re: Delete rows in A-I, if time/date in G do not match those in P

    Hi zwelty,

    Try this:

    Please Login or Register  to view this content.

  6. #6
    Registered User
    Join Date
    09-08-2012
    Location
    Panama, Panama
    MS-Off Ver
    Excel 2010
    Posts
    7

    Re: Delete rows in A-I, if time/date in G do not match those in P

    XLAdept, that worked amazingly! Only had to delete the last section, but that's no problem.

    Thanks a million!
    zwelty

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

    Re: Delete rows in A-I, if time/date in G do not match those in P

    You're welcome - but, if you don't want the last section just change:

    Please Login or Register  to view this content.
    to

    Please Login or Register  to view this content.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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