Results 1 to 5 of 5

Macro debugging

Threaded View

  1. #1
    Registered User
    Join Date
    05-31-2013
    Location
    Philadelphia
    MS-Off Ver
    Excel 2007
    Posts
    12

    Macro debugging

    Hi, I have the following code which returns a 'Subscript out of range' error when I run it. I have a function with input in cell F2 and output in cell N2. I'd like to take a list of non-null values in column C as inputs and record the corresponding outputs in column D.

    Sub Calculate_Matches()
        Dim i As Integer
        i = 3
    
        Do While Worksheets("All_Data").Cells(i, 6) <> ""
            If Worksheets("All_Data").Cells(i, 3) <> "" Then
                Worksheets("All_Data").Cells(2, 6).Value = Worksheets("All_Data").Cells(i, 3).Value
                Worksheets("All_Data").Cells(i, 4).Value = Worksheets("All_Data").Cells(2, 14).Value
            i = i + 1
        End If
    Loop
    End Sub
    I'm new to VBA - Could someone please tell me what the problem is?
    Many thanks!
    Last edited by VelvetRevolver84; 06-01-2013 at 03:04 PM.

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