Results 1 to 3 of 3

Doesn't recognize the loop?

Threaded View

  1. #1
    Registered User
    Join Date
    11-26-2014
    Location
    Taiwan
    MS-Off Ver
    2013
    Posts
    12

    Cool Doesn't recognize the loop?

    Hi, I am trying to insert a condition in a loop. Here is the code:

    Sub ezcompare()
    '
    ' ezcompare Macro
    '
    ' Keyboard Shortcut: Ctrl+r
    '
    
    Dim i As Integer, j As Integer
    Dim Value1 As Integer, Value2 As Integer
    Dim z As Integer, y As Integer
    Dim q As Integer
    
    Dim Dummy1 As Integer, Dummy2 As Integer
    i = 2
    j = 2
    
    Do While i < 100
    'i is row reference
    'j is column reference
    
    
        Value1 = Cells(5022, j).Value
        z = 211 - Value1
        Value2 = Cells(5025, j).Value
        y = 211 - Value2
    
    'Dummy1 = Cells(z, j).Value
    
        If Cells(z, j).Value >= 0.03 Then
        Cells(i, j).Value = 1
        End If
        If Cells(y, j).Value <= -0.03 Then
        Cells(i + 1, j).Value = 1
    
        i = i + 1
        j = j + 2
    
    Loop
    
    End Sub
    It says DO WHILE without LOOP... Tips and tricks to make it work? Thanks for the help!
    Last edited by AllThingsIan; 12-13-2014 at 05:32 AM.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] GetObject doesn't recognize file name
    By Pamelaann in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 09-18-2012, 03:37 PM
  2. File doesn't recognize itself anymore
    By Macro-wave in forum Excel General
    Replies: 2
    Last Post: 10-22-2010, 12:23 PM
  3. doesn't recognize the variable
    By carsto in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-30-2007, 06:34 PM
  4. Doesn't Recognize/Find Rectangle
    By Paige in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-28-2006, 02:55 PM
  5. Doesn't recognize worksheet
    By davegb in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-17-2005, 06:05 PM

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