I think a two-way lookup will solve your issue. Ordinary vlookup function
performs a one-way lookup. By combination of Index and Match functions you
can perform a two-way lookup. For details look at:
http://www.j-walk.com/ss/excel/usertips/tip020.htm
Hope this helps.
"Gauri" wrote:
> Hi,
>
> I have two tables A and B.
>
> Table A
> Code Jun
> ABC 34
> XYZ 50
>
> Table B
> Code Jun Jul Aug Sep
> ABC 34 20 10 15
> XYZ 50 38 90 60
>
> What I want to do is pull data from Table B and have it populate
> automatically in Table A based on the Code and for the concerned month. Eg.
> If the month in the column header in Table A reads as Jun the corresponding
> data for codes ABC and XYZ should pick-up from the Jun column in Table B. As
> the month in the column header changes in Table A to Jul, Aug, etc, the data
> for ABC and XYZ should pick-up from the corresponding month column in Table B.
>
> I've been going crazy trying to find a solution to this and hope that some
> of you Excel whizzes can help me out.
>
> Thanks a lot in advance for your assistance.
>
> Regards/Gauri