Help with VLookup

TSoren23

New Member
Joined
Sep 11, 2006
Messages
16
In a user form I want to enter a value in a text box (txtItem) and have it return a value in another text boxs (txtProduct), (txtProC), and (txtOpt).
I have formulas in a work sheet that now displays the value from the vlookup.

this would be the txtItem;

=IF(B4="","",VLOOKUP(B4,'\\Owensrv\owen\Management Projects\Plant Governance\[Rate Lookup Tool.xls]North'!$A:$D,2,FALSE))

This is how far I got before I got stumped trying to do it in VBA;

Set wb = Workbooks\\Owensrv\owen\Management Projects\Plant Governance\[Rate Lookup Tool.xls]")
Set ws = wb.Sheets("North")
Set rng = ws.Range("$A:$D")

ActiveCell.Value =
Application.WorksheetFunction.VLookup(ActiveCell.Offset(?,?).Value, rng,
2, False)

These are the other two vlookup formulas;
(txtProC)
=IF(B4="","",VLOOKUP(B4,'\\Owensrv\owen\Management Projects\Plant Governance\[Rate Lookup Tool.xls]North'!$A:$D,4,FALSE))

(txtOpt)
=VLOOKUP(E4,'\\Owensrv\owen\Management Projects\Plant Governance\[Rate Lookup Tool.xls]North'!$F:$I,4,FALSE)

Can any help me out here.

Thanks
 

Excel Facts

Formula for Yesterday
Name Manager, New Name. Yesterday =TODAY()-1. OK. Then, use =YESTERDAY in any cell. Tomorrow could be =TODAY()+1.

Forum statistics

Threads
1,144,625
Messages
5,725,365
Members
422,621
Latest member
dfrare

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
Top