View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.programming
Patrick Molloy Patrick Molloy is offline
external usenet poster
 
Posts: 1,049
Default delete rows that dont match values in named range

rn should be a row number
use F8 to step through the code and at the line you mention, hover the mouse
over rn and text to see what values they hold

rn is
DIM rn as Long

and its used in the for...next loop


for rn = range("A6").End(xlDown).Row to 6 step -1


"Patrick Molloy" wrote in message
...
what values are in variables rn and Text ?

"J.W. Aldridge" wrote in message
...
getting debug for "type mismatch" error on the following line...

If Cells(rn, "B").Value < Text Then