VBA for vlookup formula

shiva_reshs

Board Regular
Joined
Sep 5, 2012
Messages
68
Hi,

Need vba formula to do the following

1) Sheet(Week1),Range(B13) if IDnumber exist, then in I13 update formula to get the vlookup value from Week2 sheet(A:E,5,0)"

2) This should be done from bottom of last row to up in Sheet(Week1).

Please advise.

Thanks,
Shiva
 

Excel Facts

How can you turn a range sideways?
Copy the range. Select a blank cell. Right-click, Paste Special, then choose Transpose.
thanks. I was able to make one. Adding this here for anyone to get info on this.

Code:
Sub vlook1()    Dim LastRow As Long
    Dim i As Long
    LastRow = Range("B" & Rows.Count).End(xlUp).Row
    For i = 2 To LastRow
        If Range("B" & i).Value <> "" Then
            Range("I" & i).Value = ActiveCell.FormulaR1C1 = "=VLOOKUP(RC[-7],Week2!R10C2:R130C13,7,0)"
        End If
    Next i
End Sub
 
Upvote 0

Forum statistics

Threads
1,223,903
Messages
6,175,286
Members
452,631
Latest member
a_potato

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top