Results 1 to 2 of 2

Thread: Populating vlookup formula using vba

  1. #1

    Populating vlookup formula using vba

    Register for a FREE account, and/
    or Log in to avoid these ads!

    Sorry to post like this i am new to this side of world,
    Current i am working on a macro ,
    Basic is that , Every week i had to copy certain value from database to on worksheet,
    I had generate the basic code,
    Which is shown below

    Sub Updateactualweekly()
    ' Updateactualweekly Macro

    ActiveCell.Formula = "=VLOOKUP(A6,'JUDR PMS'!C[-76]:C[-60],17,0)"
    ActiveCell.Offset(0, 1).Select
    ActiveCell.Formula = "=VLOOKUP(A6,'JUDR PMS'!C[-77]:C[-57],21,0)"
    ActiveSheet.Range("$A$3:$EA$469").AutoFilter Field:=80, Operator:= _
    ActiveSheet.Range("$A$3:$EA$469").AutoFilter Field:=1, Criteria1:="<>"
    ActiveSheet.Range(ActiveCell, ActiveCell.Offset(0, -1)).Select

    ActiveSheet.Range(ActiveCell, ActiveCell.Offset(495, 1)).Select
    Selection.PasteSpecial Paste:=xlPasteFormulas, Operation:=xlNone, _
    SkipBlanks:=False, Transpose:=False

    End Sub

    Answer is weird

    =VLOOKUP('A6','JUDR PMS'!C:S,17,0)

    Please help me

    Thanks for time and consideration

    Regards ,
    Rizwan Khan

  2. #2
    Administrator Simon Lloyd's Avatar
    Join Date
    Apr 2011
    Manchester, England
    Excel Version
    Excel 2016
    Post moved to a thread of its own.

    Please dont hijack other peoples threads :-)
    Kind regards,
    Simon Lloyd

Posting Permissions

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