ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   look up query (https://www.excelbanter.com/excel-discussion-misc-queries/61710-look-up-query.html)

Christopher Buxton

look up query
 
I have two worksheets. They are both identical with an exception of on column
which is on my summary table. The tables are as follows:

data table: job_no; patient; hospital; fault; req_date; rec_date;

This table contains all the records from every job we have received.

summary table: job_no; patient; hospital; fault; req_date; rec_date; ACTION;

This table contains a sample of the data in the 'data table'. I add actions
to each job on this table.

I need to know how to create a lookup so it will take the ACTION from the
'summary table' and add it into a new column in the 'data table'. it should
only add the action if there is an action and the jobs_no in both tables
match as this field is unique.

any help would be appreciated

Ken Hudson

look up query
 
Hi Christopher,
Assuming the second worksheet is named Sheet2, enter the following into Cell
H1 of the first worksheet (or H2 if you have a header row) and copy the
formula down. If you have a header row, you need to change the A1's in the
formula to A2's.

=IF(VLOOKUP(A1,Sheet2!$A:$H,8,FALSE)=0,"",VLOOKUP( A1,Sheet2!$A:$H,8,FALSE))

HTH
--
Ken Hudson


"Christopher Buxton" wrote:

I have two worksheets. They are both identical with an exception of on column
which is on my summary table. The tables are as follows:

data table: job_no; patient; hospital; fault; req_date; rec_date;

This table contains all the records from every job we have received.

summary table: job_no; patient; hospital; fault; req_date; rec_date; ACTION;

This table contains a sample of the data in the 'data table'. I add actions
to each job on this table.

I need to know how to create a lookup so it will take the ACTION from the
'summary table' and add it into a new column in the 'data table'. it should
only add the action if there is an action and the jobs_no in both tables
match as this field is unique.

any help would be appreciated



All times are GMT +1. The time now is 11:00 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com