+ Reply to Thread
Results 1 to 3 of 3

IF Statment Loop in VB

  1. #1
    Registered User
    Join Date
    03-31-2011
    Location
    Liverpool
    MS-Off Ver
    Excel 2003
    Posts
    2

    IF Statment Loop in VB

    Hi everyone,

    I'm having an issue, wondering if I could get some help?

    I have a worksheet, on there I am pasting a report from else where everyday, it varies in length but is aproximetly 550 rows long.

    In there I have a column of text saying various things, I need it to delete the rows that havnt got the word "FREE" in them.

    I'm trying to do an IF statement to check the cell then loop that to check them all in order.

    Am I working along the right lines? Any hints? I can't post the code as I'm on my phone, no Internet acess on work machines!

    Thanks in advance

  2. #2
    Forum Expert Domski's Avatar
    Join Date
    12-14-2009
    Location
    A galaxy far, far away
    MS-Off Ver
    Darth Office 2010
    Posts
    3,950

    Re: IF Statment Loop in VB

    Hi,

    When deleting using a loop it's important to loop though the rows backwards, you can also use autofilter.

    I posted examples of both in this thread:

    http://www.excelforum.com/excel-prog...-contents.html

    Dom
    "May the fleas of a thousand camels infest the crotch of the person who screws up your day and may their arms be too short to scratch..."

    Use code tags when posting your VBA code: [code] Your code here [/code]

    Remember, saying thanks only takes a second or two. Click the little star to give some Rep if you think an answer deserves it.

  3. #3
    Registered User
    Join Date
    03-31-2011
    Location
    Liverpool
    MS-Off Ver
    Excel 2003
    Posts
    2

    Re: IF Statment Loop in VB

    Quote Originally Posted by Domski View Post
    Hi,

    When deleting using a loop it's important to loop though the rows backwards, you can also use autofilter.

    I posted examples of both in this thread:

    http://www.excelforum.com/excel-prog...-contents.html

    Dom
    Thank you kindly sir! That's perfect! You just saved me a lot of time! Thank you!!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1