Solved

Place txtField from Excel File1 into a field in Excel File 2 using a VLookup function

Posted on 2014-01-30
5
224 Views
Last Modified: 2014-02-16
I have 1/.  An Access dbase with tblBookings linked to 2/. An Excel File "AccessBookings" Sheet(AccessBookings) which consists of Rows from Access dBase 1/.  I have 3/. Excel File "Quote" with a sheet (FltSheet).
In 2/. the first column contains the integerID from the Access dBase and another column contains a  txtField (DestText)  that will be generated in VBA from 3/.Excel File "Quote".(SourceText)
I would like to take the integerID generated in  3/."Quote" and use it to locate and enter    3/. SourceText in the 2/. DestText field. (vlookup ?)
With that in place the Access dBase can be updated to reflect the addition of the DestText
The Excel File 3/. starts as an .xltm file which changes to a RandomFile.xlsx .
I was advised that DAO may be the way to go but that is beyon me at present (Much as I'd like to try).  Hope there's a Fundi out there who can assist. Thanks
0
Comment
Question by:LapunKiap
  • 3
  • 2
5 Comments
 
LVL 36

Expert Comment

by:PatHartman
ID: 39821435
This is an Excel question rather than an Access one.

Why does the excel VLookup() not work?  I don't use Excel so I don't know the range of its capabilities but does it allow you to lookup a value from another workbook?  I know it can reference different sheets in the same workbook.
0
 

Author Comment

by:LapunKiap
ID: 39822454
I'm having problems writing the lookup in VBA. Also, my mistake, the File 3/. is .xlsm
0
 
LVL 36

Expert Comment

by:PatHartman
ID: 39822523
DLookup() is the VBA function that is the equivalent of VLookup().  Please post your code and tell us what is happening.
0
 

Accepted Solution

by:
LapunKiap earned 0 total points
ID: 39825587
Pat thanks. Am aware of the Access DLookup. Just having problems placing a string generated in Wkb 1 into a cell in Wkb2.  In wkb1 I ascertain if a cell contains data. If it does the data will include a number (eg ABC-8). I need to place a str in wkb2 using VLookup(8,wkb2(A:AC), 5,True).   With this in place an Access dBase linked to wkb2 can be updated.

Think I hit the wrong button then.............am still working on solving this problem

Finally managed to sort my fingers out and have a solution....many thanks
VLookup-Function-XL.docx
0
 

Author Closing Comment

by:LapunKiap
ID: 39862513
Studied the code a bit longer
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

As tax season makes its return, so does the increase in cyber crime and tax refund phishing that comes with it
Did you know that more than 4 billion data records have been recorded as lost or stolen since 2013? It was a staggering number brought to our attention during last week’s ManageEngine webinar, where attendees received a comprehensive look at the ma…
This Micro Tutorial will demonstrate how to create pivot charts out of a data set. I also added a drop-down menu which allows to choose from different categories in the data set and the chart will automatically update.
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

733 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question