View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
smartin smartin is offline
external usenet poster
 
Posts: 915
Default match and extract

Dinesh wrote:
Hi,

I have one worksheet, two different tab.
There are two customer number columns in Sheet1. One of the two would have
the customer number and the other one would be blank. Column C has an amount.
Col A Col B Col C Col D (Formula to bring the amount from sheet2)
245600 50000
138956 25000
965241 14589

Sheet2 has one customer number column and an amount column.
Col A Col B
245600 50000
138956 25000
965241 14589
In Sheet1, I like to bring in the amount of Sheet2 based on matching of the
customer number of Sheet1 which is in two different columns.

Thanks,
Dinesh



Try this:

=INDEX(Sheet2!$B$1:$B$3,IF(Sheet1!A1="",MATCH(Shee t1!B1,Sheet2!$A$1:$A$3,0),MATCH(Sheet1!A1,Sheet2!$ A$1:$A$3,0)))