Thanks:  0
Likes:  0

1. Hi

I have 1 table with date in column A and and 3 digit code in column B. The 3 digit codes appear once each date. Columns C-H have the data which I want to fill cells in several other tables (each one for a diferent 3 digit code), set out by date.
My aim if to create a formula which will go and get the data in C-H if A="date" and b="3 digit code" I have tried diferent combinations of match, Index, and Vlookup but cannot seem to get the data I want to fill the cells.
I would also be interested in any macro solutions that would do the trick.

cheers

2. Cyril,

Lets say that A1:E3 houses the following sample data and you want to retrieve the value from val2 column of this table, which is associated with lookup values in G2 (a date) and H2 (a digit code).

{"date","code","val1","val2","val3";
37258,"023",3,4,5;
37258,"024",6,45,8}

Strange looking numbers are just dates in the internal representation that Excel uses for dates.

In G2 we have: 1/2/02
In H2 we have: 024

In I2 enter:

=IF(SUMPRODUCT(ISNUMBER(MATCH(G2&H2,\$A\$2:\$A\$3&\$B\$2:\$B\$3,0))+0),INDEX(\$D\$2:\$D\$3,SUMPRODUCT(MATCH(G2&H2,\$A\$2:\$A\$3&\$B\$2:\$B\$3,0))),"")

where \$D\$2:\$D\$3 in INDEX is the column from which we want to retrieve the associated value.

Note. If you're going to use this formula in lots of cells, it will incur some performance costs.

3. Hi

I would suggest one of the Dfunctions as there is no recalcualtion trade-off. The help on these is very good. I also have some slightly more advanced uses here:
DFunctionsWithValidation.zip

You may also want to consider a Pivot Table

4. Hi again and THANKYOU!!

Cheers

## User Tag List

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•