Thread: Kind of Vlookup
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Frank Kabel Frank Kabel is offline
external usenet poster
 
Posts: 3,885
Default Kind of Vlookup

Hi
one way:
=SUMIF(A1:A100,"Acc100",B1:B100)+SUMIF(A1:A100,"Ac c300",B1:B100)

or try
=SUMPRODUCT(--(A1:A100={"Acc100","Acc300"}),B1:B100)


--
Regards
Frank Kabel
Frankfurt, Germany


Can someone help me with this one?

I want to write a function similiar to Vlookup;
Except it should be able to take more than one lookup value and then
add the values returned;

For Example
Column A Column B
Acc100 R 1000
Acc200 R 2000
Acc300 R 3000
Acc400 R 4000

The function should search Range(A1:B4) for say Acc100 and Acc300 and
then add the corresponding values from Column B
R1000 + R 3000 ;

Thanks!


---
Message posted from http://www.ExcelForum.com/