Thread: VLOOKUP & Array
View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
T. Valko T. Valko is offline
external usenet poster
 
Posts: 15,768
Default VLOOKUP & Array

Here's another one:

=SUM(SUMIF(A1:A3,{"a","b","c"},B1:B3))

--
Biff
Microsoft Excel MVP


"AlanR" wrote in message
...
I have a sheet that looks like:
A B
a 1
b 2
c 3

=vlookup("a",A1:B3,2,0)=1
=vlookup("b",A1:B3,2,0)=2
=vlookup("c",A1:B3,2,0)=3

I want to add values {"a","b","c"}, so

=sum(vlookup({"a","b","c"},A1:B3,2,0))=sum({1,2,3} )=6