Solved

Pull data based on a column in EXCEL 2007

Posted on 2011-09-28
3
197 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
  • 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

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

Suggested Solutions

Convert between Excel file formats (.XLS, .XLSX, .XLSM) with/without macro option David Miller (dlmille) Intro Over this past Fall, I've had the opportunity to see several similar requests and have developed a couple related solutions associate…
This tutorial explains how to create a series of drop-down lists that are dependent upon prior selections to guide (“force”) the user to make the correct selection and reduce data errors within Microsoft Excel. Excel 2010 was used for this tutorial;…
The viewer will learn how to simulate a series of coin tosses with the rand() function and learn how to make these “tosses” depend on a predetermined probability. Flipping Coins in Excel: Enter =RAND() into cell A2: Recalculate the random variable…
This Micro Tutorial will demonstrate on a Mac how to change the sort order for chart legend values and decrpyt the intimidating chart menu.

762 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now