vba help with vlookup

steve2115

Board Regular
Joined
Mar 17, 2014
Messages
82
Need some help with vba to handle vlookup from one sheet to another in same workbook.
Standard formula in cell U2 to bottom of dart =VLOOKUP($E2,'Ampacet Pricing File'!$C:$F,4,FALSE)
I need to lookup E2,E3,E4, etc. to bottom of data on sheet 'Upload' to sheet 'Ampacet Pricing File' columns C:F, and then bring back the value to sheet 'Upload' column U.

thanks
Steve
 

Excel Facts

Show numbers in thousands?
Use a custom number format of #,##0,K. Each comma after the final 0 will divide the displayed number by another thousand
Do you want the formula in the cell, or just the value?
 
Upvote 0
Try this

Code:
Sub test1()
  With Range("U2:U" & Range("E" & Rows.Count).End(xlUp).Row)
    .Formula = "=VLOOKUP($E2,'Ampacet Pricing File'!$C:$F,4,0)"
    .Value = .Value
  End With
End Sub

Remove this line if you only want the formula
Code:
 .Value = .Value
 
Upvote 0

Forum statistics

Threads
1,223,893
Messages
6,175,240
Members
452,621
Latest member
Laura_PinksBTHFT

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