Thread: database query
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Billy Liddel Billy Liddel is offline
external usenet poster
 
Posts: 527
Default database query

I think that you need dynamic ranges for the fields and table. For the table
CustomerDetails, comprising the fields Customer_Name, Customer_Order,
Customer_Region

Custdetails =OFFSET(Customer_Name,0,0,COUNTA(Sheet3!$A:$A)-1,COUNTA(Sheet3!1:1))
Customer_Name =OFFSET(Sheet3!$A$2,0,0,COUNTA(Sheet3!$A:$A)-1)
CustRgn =OFFSET(Customer_Name,0,2)
Order_Mgr =OFFSET(Customer_Name,0,1)

You may not need CustRgn and Order_Mgr just the name and CustDetails Table.

The table is flexible for columns as well as rows so if other fields are
added later they will be included.

You can also use the Customer name in a data validation for your lookups.
Where the Lookups are to go choose, Data, Validation, In the Allow box choose
List and in the source box type =Customer_Name.

Hope this helps
Peter Atherton

"Excel sheet password" wrote:

Hi,

I have a database which contains Customer Code, Customer Name, Order
Manager, Customer Region.
I am creating a template in which after entering the Customer Code;

Customer Name, Order Manager, Customer Region.

gets displayed automatically using Vlookup.
But Order Manager is getting updated regularly & customer code is been added
& deleted regularly.

I need another method that is linking database (Excel) using query within
Excel? so that as excel database gets updated everything gets updated in my
new template .