View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.misc
Icyhot Icyhot is offline
external usenet poster
 
Posts: 2
Default pull data from one table to another if multiple conditions are met

I have two tables. One has a column for State and a column for Month/Year.
The other table has a column for State, a column for beginning period and a
column for ending period. There are other columns in each table. When the
Month/Year in the first table falls between the beginning and ending period
in the second table and the State is the same, I want to pull a value from
the second table to the first table. Can Excel do it? How?

Table 1 (thousands of records with different State and Month/Year)
NY 03/2004
NY 05/2005
....
CA 08/2003
CA 10/2004
....

Table 2
NY 01/2001 12/2003 rate1
NY 01/2004 12/2006 rate2
....
CA 01/2001 12/2003 rate3
CA 01/2004 12/2006 rate4
....

The target result should be

NY 03/2004 rate2
NY 05/2005 rate2
....
CA 08/2003 rate3
CA 10/2004 rate4
....