View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
T. Valko T. Valko is offline
external usenet poster
 
Posts: 15,768
Default How to vlookup a value with certain conditions?

One way assuming the value to be returned is numeric.

On Sheet2:

A1 = aaa
B1 = category2

Enter this formula in C1 and copy down as needed:

=SUMPRODUCT(--(Sheet1!A$1:A$5=A1),--(Sheet1!B$1:B$5=B1),Sheet1!C$1:C$5)

--
Biff
Microsoft Excel MVP


"Coeus" wrote in message
...
Hi all,

I have a workbook, which have two sheets, Sheet A is like below:

aaa category1 111
aaa category2 222
bbb category1 333
bbb category2 444
bbb category3 555

and sheet B like below:

aaa
bbb

For which functions i should use to make sheet B like below - only get
category2 value.

aaa 222
bbb 444

Thanks a lot!