View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Javed Javed is offline
external usenet poster
 
Posts: 91
Default Macro to delete entire row

On May 12, 2:46*pm, Carol wrote:
Hi,

I am using this formula

=IF(COUNTIF($A$6:$A$33100,A6)=1,TRUE,COUNTIF($A$6: A6,A6)=COUNTIF($A$6:$A
$33100,A6))

to highlight the last row item for cells with duplicates. I need to
delete the entire row of all rows that were not highlighted by this
formula.

Hope this makes sense. Any help would be appreciated.

*** Sent via Developersdexhttp://www.developersdex.com***


You can use any loop code but if you change the formula a bit then it
can be done very easily----

probably your function returns FALSE and highlights the row.Change
that formula so that 1 returns.

Worksheets("SheetName").Range
_("Coulmn_Where_formula_Placed").Specialcells(type :=xlcelltypeformulas,value:=XlNumbers).Entirerow.D elete