excel - Trying to delete rows with cells that have same value as previous in VBA -


i trying remove duplicate records using column, , seem have some success, have still found duplicates. hoping tell me can improve this.

thanks

dim       integer dim value   string  = 3 range("a" & i).select  until isempty(activecell)     range("a" & i).select     value = activecell.value     until isempty(activecell)         if activecell.value = value             activecell.entirerow.delete         else             activecell.offset(1, 0).select         end if     loop     = + 1 loop 

i believe following work if removing duplicates of column , not have header row:

activesheet.range("a:a").removeduplicates columns:=1, header:=xlno 

Comments

Popular posts from this blog

Is there a better way to structure post methods in Class Based Views -

performance - Why is XCHG reg, reg a 3 micro-op instruction on modern Intel architectures? -

jquery - Responsive Navbar with Sub Navbar -