Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
I'd insert a helper column near column A (a new column B???).
Then put this formula in B2 (headers in row 1???): =IF(COUNTIF(A:A,A2)<4,"DeleteMe",IF(COUNTIF(A2:$A$ 2,A2)4,"DeleteMe","KeepMe")) Drag down the column Apply Data|Filter|autofilter to this helper column and show the DeleteMe rows Delete those visible rows. data|filter|show all (to see everything) Double check your work And delete the helper column Chris_t_2k5 wrote: Here is my problem. I have a spreadsheet with columns A:G populated. Within column A are various names of dogs. Columns B:G are statistics about the dogs. What I require is a macro that will delete certain rows based on the following criteria: In column A there are many duplicate names. I only require 4 of each name so if there are 5 instances of "Annie" then 1 should be deleted and if there are only 3 instances of "Bob" then these should all be deleted as there are not 4. Thanks in advance -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
return multiple rows of data based on criteria | Excel Worksheet Functions | |||
Can I delete blank rows from excel without selecting them? | Excel Worksheet Functions | |||
Delete rows based on certain criteria | Excel Discussion (Misc queries) | |||
Code to delete rows and column cells that have formulas in. | Excel Worksheet Functions | |||
Copying whole rows based upon one criteria | Excel Discussion (Misc queries) |