View Single Post
  #7   Report Post  
Posted to microsoft.public.excel.misc
James James is offline
external usenet poster
 
Posts: 542
Default Vlookup off multiple columns

Thanks Lars-Åke

That's great it works! Another question though, what happens if "ZZ" appears
more than once i.e. more than one row has a "ZZ", it'll add them together
e.g. 2 "ZZs" would give a result of 44. How would you get around that?!


--
James.


"Lars-Åke Aspelin" wrote:

On Wed, 22 Jul 2009 05:10:01 -0700, James
wrote:

Hello there

I am trying to do a vlookup off multiple columns. For example below if I am
trying to find the result of "22" for a value "ZZ" in columns A to C below
how to I tell it to lookup in all 3 columns i.e. A-C and return the result in
column D?


A B C D
ZX ZZ ZA 22



Try this formula:

=SUMPRODUCT(--((A1:A100="ZZ")+(B1:B100="ZZ")+(C1:C100="ZZ")0)*( D1:D100))

Change 100 in all places to fit the number od rows with data you have.
This formula will return the sum in column D for all rows where there
is a "ZZ" in either of the columns A to C.

Hope this helps/ Lars-Åke