title: Delete rows based on column value
body: <p>I would like to know how to delete the rows based on column in VBA?</p>
  
  <p>Here is my excel file </p>
  
  <pre><code>       A              B             C              D         E               F
       Fname          Lname         Email           city     Country     activeConnect
  1     nikolaos       papagarigoui  np@rediff.com   athens   Greece         No
  2     Alois          lobmeier      al@gmx.com      madrid   spain          No
  3     sree           buddha        sb@gmx.com      Visakha  India          Yes
  </code></pre>
  
  <p>I want to delete the rows based on activeconnect(i.e "NO") those who don't have activeconnect "NO". </p>
  
  <p>The output should be as below.</p>
  
  <pre><code>       A              B             C              D         E               F
        Fname          Lname         Email           city     Country     activeConnect
  1     nikolaos       papagarigoui  np@rediff.com   athens   Greece         No
  2     Alois          lobmeier      al@gmx.com      madrid   spain          No
  </code></pre>
  
  <p>firstly, the code has to select all the rows based on column header(activeconnect) status as "No",then it has to delete the rows </p>
  
  <p>I have more of raw data that includes 15k rows and 26 columns. The code has to be work automatically when we execute  in VBA.</p>
  
  <p>the sheet name is "WX Messenger import"
  note: F1 is column header that is "activeConnect"</p>
  
  <p>Here is my code.</p>
  
  <pre><code>Sub import()
  lastrow = cells(rows.count,1).end(xlUp).Row
  
  sheets("WX Messenger import").select
  range("F1").select
  
  End sub
  </code></pre>
  
  <p>after that im unable to do the code based on column header. could someone please let me know. The remaining code must select the rows based on activeConnect status as "NO" and then delete it.</p>