Consulting

Results 1 to 5 of 5

Thread: Solved: .FormulaR1C1 VBA

  1. #1

    Solved: .FormulaR1C1 VBA

    Hey guys,

    Been trying to play around with the .FormulaR1C1 in VBA but with no luck

    i have the following
    [VBA] 'Vlookup
    Set rMy_Range = .Range("F6:F" & iLast_row)
    ' rMy_Range.Select
    rMy_Range.FormulaR1C1 = "=VLOOKUP(R[0]C[-1],'Search Criteria'!C289,2,FALSE)"[/VBA]

    But it brings populate the cells with the following:
    [VBA]=VLOOKUP(E6,'Search Criteria'!$B:$B:'D89',2,FALSE)[/VBA]

    As you can see the tablelookup i.e. ",'Search Criteria'!C289" is set but this seems to be ignored...

    Any help?

  2. #2
    Knowledge Base Approver VBAX Wizard p45cal's Avatar
    Joined
    Oct 2005
    Location
    Surrey UK
    Posts
    5,875
    rMy_Range.FormulaR1C1 = "=VLOOKUP(R[0]C[-1],'Search Criteria'!R3C3:R89C4,2,FALSE)"
    ?
    p45cal
    Everyone: If I've helped and you can't be bothered to acknowledge it, I can't be bothered to look at further posts from you.

  3. #3
    DOH!

    Forgot to change to r1c1!!!

  4. #4
    Knowledge Base Approver VBAX Wizard p45cal's Avatar
    Joined
    Oct 2005
    Location
    Surrey UK
    Posts
    5,875
    Quote Originally Posted by p45cal
    rMy_Range.FormulaR1C1 = "=VLOOKUP(R[0]C[-1],'Search Criteria'!R3C3:R89C4,2,FALSE)"
    ?
    rMy_Range.FormulaR1C1 = "=VLOOKUP(R[0]C[-1],'Search Criteria'!R2C3:R89C4,2,FALSE)"
    p45cal
    Everyone: If I've helped and you can't be bothered to acknowledge it, I can't be bothered to look at further posts from you.

  5. #5
    Yeah saw that,

    Thanks a lot for the help p45cal....

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •