Results 1 to 4 of 4

VLOOKUP at VBA Code

Threaded View

  1. #1
    Registered User
    Join Date
    04-15-2009
    Location
    Israel
    MS-Off Ver
    Excel 2019
    Posts
    79

    VLOOKUP at VBA Code

    Hello Experts

    I want to use the function VLOOKUP at my VBA program inside a FOR Loop

    what wrong with my code ?

    For p = 2 To tblrows
            If Range("b" & p).Value = "1" Then
            Range("J" & p).Select
            Selection.FormulaR1C1 = "=VLOOKUP(C & p,'sheet1'!$A:$i,9,false)"
            Columns("J:J").EntireColumn.AutoFit
            Else
            Range("j" & 9).Value = "0"
            End If
        Next p
    thanks

    Shark Man
    Last edited by Shark Man; 04-17-2009 at 04:35 PM.

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