Wrox Programmer Forums
|
Excel VBA Discuss using VBA for Excel programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Excel VBA section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old February 18th, 2008, 06:57 AM
Registered User
 
Join Date: Feb 2008
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Vlookup with VBA

Hi

Can anyone help me with a vlookup I need to do.

I have two excel files. One orders and the other contract.

The contract file contains the contract no in column A, contract ref in column B, The orders file contains contract no in column A, in column B I want to add the contract ref from the other file.

Hope this makes sense.
Thanks for your help
Andy Gill


 
Old November 6th, 2008, 06:12 PM
pjm pjm is offline
Authorized User
 
Join Date: Jul 2006
Posts: 70
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Try using something like the following in column B of the second file:

      =VLOOKUP(A1,'C:\Directory Path\[Orders.xls]Sheet1'!$A$1:$B$500,2)


      -Phil-
 
Old November 6th, 2008, 06:44 PM
Friend of Wrox
 
Join Date: Jun 2008
Posts: 1,649
Thanks: 3
Thanked 141 Times in 140 Posts
Default

Still answering ancient history posts, I see. And here I thought that *I* answered too many posts.

It's a good answer, though.





Similar Threads
Thread Thread Starter Forum Replies Last Post
VLookup with Strings Problem dem1an Excel VBA 1 June 3rd, 2008 10:46 AM
Problem with VLookup and DATEVALUE in VBA Sharadk74 Excel VBA 2 April 25th, 2008 09:30 AM
Vlookup - Add entries to sheet that didnt match ttbhandari Excel VBA 2 September 21st, 2006 10:29 AM
VLookup, arrays, and worksheet names chp Excel VBA 0 April 7th, 2006 03:15 PM
character to range conversion for VLOOKUP gskoog Excel VBA 1 May 26th, 2004 05:10 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.