Results 1 to 9 of 9

Excel 2007 : VLOOKUP on FormulaR1C1 problem

Threaded View

  1. #1
    Registered User
    Join Date
    05-05-2010
    Location
    Hong Kong
    MS-Off Ver
    Excel 2007
    Posts
    9

    VLOOKUP on FormulaR1C1 problem

    I have a file , I just wnat to search "sheet1" "A" columns from "sheet2" "B" columns :
    Dim myRowCount As Integer, MyFormula As String
    
    myRowCount = Range("A1").CurrentRegion.Rows.Count
    
    MyFormula = "=VLOOKUP(RC[-1],Sheet2!A:B,2,0)"
    
    Range("B1", "B" & myRowCount).FormulaR1C1 = MyFormula
    But it came out the resuit is "VLOOKUP(A1,Sheet2!A: (B) ,2,0)"
    the "B" column (B) have parenthese on it ,it make the formula don't work
    do I wirte any thing wrong?
    Last edited by am0251; 05-05-2010 at 06:37 AM. Reason: add code tags

Thread Information

Users Browsing this Thread

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

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