Solved

Pull data based on a column in EXCEL 2007

Posted on 2011-09-28
3
233 Views
Last Modified: 2012-05-12
Hi all.

I want to create an EXCEL 2007 template that when the user pastes data into column A in the 3rd row it will pull data from tableA based on the contents of each field (left outer join from EXCEL column A to tableA on the ItemField).

I know how to create a data connection to my TableA but how do I tell it to be a left outer join on columnA. Also, sometimes the end user will paste 3 rows, other times 30, basically the amount of data that is pasted in the spreadsheet will vary.

Any ideas? Thank you in advance!
0
Comment
Question by:printmedia
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 9

Expert Comment

by:experts1
ID: 36718573
Use VLOOKUP in another column, say column B for 30 rows or more if necessary and reference column A of the said row to compare data fromTableA.
0
 

Author Comment

by:printmedia
ID: 36718863
Hi experts1.

So when the end user opens the excel template they will paste their records in the first column under the column header in the 3rd row. Then they will press a command button that will VLOOKUP?

Can I use VLOOKUP in vba in order to tap into the SQL table?
0
 
LVL 9

Accepted Solution

by:
experts1 earned 500 total points
ID: 36719159
In "ThisWorkbook" VBA module use Workbook_SheetSelectionChange() subroutine to tap into the SQL table and generate an updated  DATA range in the workbook, for use as the range lookup source for VLOOKUP function.
0

Featured Post

Creating Instructional Tutorials  

For Any Use & On Any Platform

Contextual Guidance at the moment of need helps your employees/users adopt software o& achieve even the most complex tasks instantly. Boost knowledge retention, software adoption & employee engagement with easy solution.

Question has a verified solution.

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

Do you use a spreadsheet like Microsoft's Excel?  Have you ever wanted to link out to a non excel file on your computer or network drive?  This is the way I found to do it!
This article describes a serious pitfall that can happen when deleting shapes using VBA.
This Micro Tutorial will demonstrate how to use a scrolling table in Microsoft Excel using the INDEX function.
Many functions in Excel can make decisions. The most simple of these is the IF function: it returns a value depending on whether a condition you describe is true or false. Once you get the hang of using the IF function, you will find it easier to us…

726 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