Results 1 to 6 of 6

Compile error: Expected end of statement

Threaded View

  1. #1
    Registered User
    Join Date
    08-30-2013
    Location
    Canada
    MS-Off Ver
    Excel 2010
    Posts
    95

    Lightbulb Compile error: Expected end of statement

    Sub big_v()
        Dim LastRow As Variant
        Dim Lastcolumn As Variant
        Dim count1 As Long
        Dim count2 As Long
        Dim count3 As Long
        count3 = 10
        LastRow = Range("C6").End(xlDown).Row
        LastRow = -1 * (LastRow)
        Lastcolumn = ThisWorkbook.Worksheets("Data Sheet").Cells(3, 5)
        Lastcolumn = -1 * (Lastcolumn + 10)
        count2 = -3
        For count1 = -7 To Lastcolumn Step -1
            .Cells(6, count3).Select
            ActiveCell.FormulaR1C1 = "=VLOOKUP(RC["count1"],Sheet1!C["count1"]:C["count2"],5,FALSE)"
            count3 = count3 + 1
            count2 = count2 - 1
        Next count1
            
    End Sub


    i want to put the counters in the [] brackets but i get a compile error expected end of stantement
    Last edited by RoOmIE; 10-08-2013 at 11:20 AM.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Compile Error: Expected: End of Statement
    By eemiller1997 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 12-14-2012, 09:37 AM
  2. [SOLVED] Compile error: Expected end of statement
    By nenadmail in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-29-2012, 07:12 PM
  3. Replies: 4
    Last Post: 05-16-2012, 05:33 PM
  4. Compile Error Expected: End of statement
    By AKarmyguy in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-03-2010, 02:20 AM
  5. How to fix a Compile Error Expected: End of statement.
    By AKarmyguy in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-03-2010, 02:19 AM

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