Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
cujimm
 
Posts: n/a
Default Associate External Data with an added column


Hi All,

I would like to associate an additional column with some information that I
get by using an external query in excel. Whenever I do the refresh, my data
columns don't always line up. Is there a way to tie the data to a particular
key.

For example, I have a customer number and their name that come from a
database. I then add an additional column called comments. I then requery
the database and my data no longer lines up if more customers were added.


  #2   Report Post  
Posted to microsoft.public.excel.misc
bpeltzer
 
Posts: n/a
Default Associate External Data with an added column

Check for help on the VLOOKUP function; it retrieves data from another table
based on a common key. So you'd get your query results onto another sheet.
Then in your main table, you'd put a formula such as:
=vlookup(cust#,data_table,data_table_column,false) . That will pull back
into your main table the first comments regarding that customer from the
query results. If there are no query results for that customer, you'd get
back #N/A. You could get around that with a slightly more complex formula:
=if(isna(vlookup_function),"",vlookup_function), where vlookup_function is
the first function above (without the = sign).
Hope this points you in the right direction... --Bruce

"cujimm" wrote:


Hi All,

I would like to associate an additional column with some information that I
get by using an external query in excel. Whenever I do the refresh, my data
columns don't always line up. Is there a way to tie the data to a particular
key.

For example, I have a customer number and their name that come from a
database. I then add an additional column called comments. I then requery
the database and my data no longer lines up if more customers were added.


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel Macro to Copy & Paste [email protected] Excel Worksheet Functions 0 December 1st 05 01:56 PM
Help PLEASE! Not sure what answer is: Match? Index? Other? baz Excel Worksheet Functions 7 September 3rd 05 03:47 PM
displaying data within column iconic83 Charts and Charting in Excel 2 August 19th 05 12:11 AM
How do I create a list in excel that contains external data? bill@bb Excel Discussion (Misc queries) 1 February 15th 05 02:45 AM
Pulling data from 1 sheet to another Dave1155 Excel Worksheet Functions 1 January 12th 05 05:55 PM


All times are GMT +1. The time now is 01:33 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"