View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
tskogstrom[_2_] tskogstrom[_2_] is offline
external usenet poster
 
Posts: 13
Default Removing rows of data based on two collumn match

Unsure if you solved the case with your last remark, but an advise is, to let the user GUI and worksheet formulas do the comparing and heavy work, and just use VBa to do the check and delete. Excel user GUI is much faster than VBA.

Second, instead of looping, if you can use a "help column" that tells e.g. FALSE if false, and 1 if true. Then you can select all rows to delete in one single line, using e.g.:

ActiveSheet.Range("A1:A1000").SpecialCells(xlCellT ypeFormulas, xlNumbers).EntireRow.Delete


And yes, IF as formula just allow seven nested, then you had to break it up into several columns instead.

/regards