|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
How to populate cells in Sheet2 with Data Source query using cell data from Sheet1
I have a column of cells in Sheet1 and need to use the data in those cells to populate several cells in Sheet2 using a query to a data source. Currently, there are thousands of rows in sheet1 and I need to populate the same number of rows in Sheet2:
the Sheet1!G1 cell is the cust number and will be copied to Sheet2!A1; Sheet2!B1 would be cust name; Sheet2!C1 would be cust addr; etc. Sheet1!G2 is copied to Sheet2!A2; Sheet2!B2 would be cust name; Sheet2!C2 would be cust addr; etc. Specifically, I need to use the Customer Number from the cell in Sheet1 and then query a SQL Server database to get the information for that customer number: name, address, phone, etc. Can I do this using an Excel data source query or will I need to use some VB code to get the data? |
#2
|
|||
|
|||
Would it not be possible to import (or link) the data to Excel? If this is viable then you can use a VLOOKUP to collect the name, addr, ph, etc...
|
#3
|
|||
|
|||
RudiS,
Thanks for your post. The data is in a SQL Server database and there are too many records so an import to Excel is not possible. Also, new numbers are added to the database every day. |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Populate Data to another cell | Mrkieth | Excel | 2 | 04-29-2013 07:30 AM |
split text files to worksheets (sheet1,sheet2,sheet3 soon sheet 25) | gsrikanth | Excel Programming | 1 | 03-22-2012 11:04 PM |
How to merge two cells from sheet1 to one cell in sheet2 in next sheet | KIM SOLIS | Excel | 6 | 10-30-2011 11:14 PM |
How can I fill the below emty cells with above cell data? | Learner7 | Excel | 8 | 06-28-2011 12:10 PM |
How to combine different cells data in one cell? | Learner7 | Excel | 1 | 07-28-2010 12:07 PM |