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

Did you know Excel offers Filter by Selection?
Add the AutoFilter icon to the Quick Access Toolbar. Select a cell containing Apple, click AutoFilter, and you will get all rows with Apple
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
Im glad to help you. Thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,214,980
Messages
6,122,563
Members
449,088
Latest member
Motoracer88

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