Results 11 to 11 of 11

Thread: Retain set of 4 Days Data, based on Row data in 3 columns, and delete rest

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Member
    Join Date
    Aug 2013
    Posts
    59
    Rep Power
    12

    Retain set of 4 Days Data, based on Row data in 3 columns, and delete rest

    I have a spreadsheet where data (Range A:O) could vary from 1500 rows to 5000 rows daily. Row 1 (A1:O1) has Header, and should remain intact.

    Column B, Column C, and Column D could have duplicate data IN ROWS, but 'Column O' having DATE data distinguishes each row.

    The current structure is such that, I've lined up data datewise, and in all situations, for identical data series based on column B, ColumnC, and Column D, there should be data for maximum 4 days, on which I can carry on my further analysis, but wherever data set (based on identical data in Column B, ColumnC, and ColumnD is less than 4 days, I want to delete such rows).

    So, I need a macro which would do as under;

    Wherever, data is less than 4days, I want to delete such rows, and move data(ROW) up.

    For instance, in given sample file, (see pic)



    Row 2 & 3 having similar data (In column B, Column C, Column D) is only for two days (5 Dec 2013, and 6 Dec 2013), so i want to delete these two rows

    Row 4 & 5 having similar data (In column B, Column C, Column D) is only for two days (5 Dec 2013, and 9 Dec 2013), so i want to delete these two rows

    Row 6, 7, & 8 having similar data (In column B, Column C, Column D) is only for three days (5 Dec 2013, 6 Dec 2013 and 9 Dec 2013), so i want to delete these three rows

    BUT

    Row 11,12,13,14 has 4 days of sequential data which only, I want to keep.

    In my main workbook, there could be several such sets of 4 days data as in case of Row 11 to Row14
    Since Row 2 to 10 does not meet my criteria such rows should be deleted and data in subsequent rows should be lifted up. Sample data file is attached.
    Attached Files Attached Files

Similar Threads

  1. Replies: 10
    Last Post: 08-31-2013, 06:56 PM
  2. Replies: 6
    Last Post: 08-14-2013, 04:25 PM
  3. Replies: 2
    Last Post: 03-05-2013, 07:34 AM
  4. Autofill the data based on non blank cell in next row?
    By Rajesh Kr Joshi in forum Excel Help
    Replies: 3
    Last Post: 11-29-2012, 04:16 PM
  5. Group Pivot Data Based On Row Values In One Column
    By mrmmickle1 in forum Excel Help
    Replies: 10
    Last Post: 10-09-2012, 11:46 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •