Sure, let's start from the inside:
--(Sheet2!$A$1:$A$50=$A2)*--(Sheet2!$B$1:$B$50=F$1)
This is the array part. This compares the values of the column A on sheet 2
with the A2 cell on the current sheet (the name), and the column B on sheet 2
with the cell F1 of the current sheet (the type of phone). It returns an
array of mostly 0s, with a 1 in the place where both conditions are fulfilled
at the same time.
The following part:
MATCH(1,--(Sheet2!$A$1:$A$50=$A2)*--(Sheet2!$B$1:$B$50=F$1),0))
This looks for that 1 in the array, and returns its position in the array.
That value will be used in the INDEX formula to retrieve the value from the
column C of sheet 2:
=INDEX(Sheet2!$C$1:$C$50,MATCH(1,--(Sheet2!$A$1:$A$50=$A2)*--(Sheet2!$B$1:$B$50=F$1),0))
I hope that with this you know what to modify to adjust to your cell. It is
also important to check that the formula has been entered as array formula,
it should show curly brackets on the formula bar (don't try to enter them,
just check that they are there)
Hope this helps,
Miguel.
"SamGB" wrote:
Thanks
that looks like it will work although im having trouble modifying it to
work with my sheet. can you just tell me a breakdown of what parts of
the formula do what. it would be a great help
--
SamGB
------------------------------------------------------------------------
SamGB's Profile: http://www.excelforum.com/member.php...o&userid=31263
View this thread: http://www.excelforum.com/showthread...hreadid=545609