Hi,

I have a bunch of worksheets where i need 2 small adjustments, does anyone know how i can change the code underneath to put in a hyperlink in cell b3 and a vlookup formula in cell b9?

Thank you in advance

Sub test()


    Dim MyPath          As String
    Dim MyFile          As String
    Dim Wkb             As Workbook
    Dim Cnt             As Long
    
    Application.ScreenUpdating = False
    
    MyPath = "C:\Users\Domenic\Documents\MyFolder\"
    
    If Right(MyPath, 1) <> "\" Then MyPath = MyPath & "\"
    
    MyFile = Dir(MyPath & "*.xls")
    
    Cnt = 0
    Do While Len(MyFile) > 0
        Cnt = Cnt + 1
        Set Wkb = Workbooks.Open(MyPath & MyFile)
        Wkb.Worksheets("Sh").Range("B3").Value = "MyNewValue"
        Wkb.Close savechanges:=True
        MyFile = Dir
    Loop
    
    If Cnt > 0 Then
        MsgBox "Completed...", vbExclamation
    Else
        MsgBox "No files were found!", vbExclamation
    End If
    
    Application.ScreenUpdating = True
    
End Sub