View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Max Max is offline
external usenet poster
 
Posts: 9,221
Default Extract data from a table

=sumproduct(--(a1:a20=16),--(b1:b20=4),--(c1:c20=2),(d1:d20))

To retrieve from d1:d20, use the index / match "equivalent":
=index(d1:d20,match(1,(a1:a20=16)*(b1:b20=4)*(c1:c 20=2),0))
Array-enter the formula above by pressing CTRL+SHIFT+ENTER
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
"shnim1" wrote in message
...

Hi

I have data in four columns. Column A have numbers in the cells
(numbers between 1-20), column B with numbers 1-5, colum C with numbers
1-6. These numbers are not in any kind of order and sometimes repeat
themselves (shown more than once). In colum D I have text in each cell.
What I need to do is to extract the line of text that corresponds to a
row that meets a number criteria.

For example:
I get numbers 16, 4, and 2 (colums A. B and C). I need to know what the
text is in column D that has these three numbers in its row. I have
tried:

=sumproduct(--(a1:a20=16),--(b1:b20=4),--(c1:c20=2),(d1:d20))

but that just wants to add the cell value in coilumn D and return a
value of zero

please can anyone help

Cheers in advance




--
shnim1