+ Reply to Thread
Results 1 to 2 of 2

Problem with combining For Each and If Then statements

  1. #1
    Registered User
    Join Date
    02-08-2010
    Location
    Roosendaal, The Netherlands
    MS-Off Ver
    Excel 2007/Excel 2010
    Posts
    1

    Problem with combining For Each and If Then statements

    It's been some time since I did any sort of programming.

    Please Login or Register  to view this content.
    What I want to do I filter out meaningfull cells from meaningless cells, cells with a value of 0 are meaningless everything els is meaningfull. The meaningfull cells are copied to a different sheet to be proccesed again.

    So in line 2 I start moving trough my selected ranges, if the value = 0 then I want to move to the next cell, but Excel gives the following error in line 4 "Next without For" and if I change it to End If so it skips line 5 it gives the error " End If without block If"

    So I looked up why it was giving that error, what I found was that after the If Then structure you give a statement but witch statement to use to go to the next cell or a different solution ofc

    Greetz & Thanks Jotje.
    Last edited by Jotje; 06-22-2011 at 10:05 AM. Reason: Title

  2. #2
    Forum Expert snb's Avatar
    Join Date
    05-09-2010
    Location
    VBA
    MS-Off Ver
    Redhat
    Posts
    5,649

    Re: Problem with combining For Each and If Then statements

    Kopieer alle zinvolle gegevens naar kolom AD
    Copy all relevant data to column AD
    Please Login or Register  to view this content.



+ 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