<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
  <channel>
    <title>'VBA loop to delete entire row if cells contain a particular string' Thread RSS Feed</title>
    <link>http://www.programmersheaven.com/</link>
    <description>Contains the latest posts from the thread 'VBA loop to delete entire row if cells contain a particular string' posted on the 'VBA' forum at Programmer's Heaven.</description>
    <language>en</language>
    <copyright>Copyright 2013 Programmers Heaven</copyright>
    <pubDate>Tue, 18 Jun 2013 22:33:56 -0700</pubDate>
    <lastBuildDate>Tue, 18 Jun 2013 22:33:56 -0700</lastBuildDate>
    <generator>Argotic Syndication Framework 2007.3.0.1, http://www.codeplex.com/Argotic</generator>
    <docs>http://www.rssboard.org/rss-specification</docs>
    <ttl>360</ttl>
    <image>
      <url>http://www.programmersheaven.com/images/ph.gif</url>
      <title>Programmers Heaven</title>
      <link>http://www.programmersheaven.com/</link>
      <width>88</width>
      <height>31</height>
    </image>
    <item>
      <title>VBA loop to delete entire row if cells contain a particular string</title>
      <link>http://www.programmersheaven.com/mb/vba/429301/429301/vba-loop-to-delete-entire-row-if-cells-contain-a-particular-string/</link>
      <description>Hello,&lt;br /&gt;
&lt;br /&gt;
I need code to go through cells of a column of unknown length and delete the entire row if the cells contain a particular string ("--"). This is what I have so far, but it does not work. Can anyone help? I can't program.&lt;br /&gt;
&lt;br /&gt;
    Dim RowKdx As Long&lt;br /&gt;
    For RowKdx = Range("b1").End(xlDown).Row To 2 Step -1&lt;br /&gt;
    Do While Cells(RowKdx, "b").Value &amp;lt;&amp;gt; ""&lt;br /&gt;
    If InStr(RowKdx, "--") = 1 Then&lt;br /&gt;
    Rows(RowKdx).Delete&lt;br /&gt;
    End If&lt;br /&gt;
    RowKdx = RowKdx - 1&lt;br /&gt;
    If RowKdx = 1 Then Exit For&lt;br /&gt;
    Loop&lt;br /&gt;
    Next RowKdx&lt;br /&gt;
&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/vba/429301/429301/vba-loop-to-delete-entire-row-if-cells-contain-a-particular-string/</guid>
      <pubDate>Thu, 23 Aug 2012 11:36:57 -0700</pubDate>
      <category>VBA</category>
    </item>
  </channel>
</rss>