Share via

Excel function with multiple arguments to return a result

Anonymous
2015-05-07T00:24:24+00:00

I have the below function to compare  many argument and return a value in cell.

Example:

The values in ColumnH are equal with the value in column J2 and in column A contain Past, Present or Future and return the value from column A in column L.

Column A         Column H        Column J    Results Column L

Past                       Italy                Italy                   Past

Past                       Italy               China                  Present

Present                 China              Spain                  Future

Present                 China

Future                   Spain

I Try to use this function but not work:

=IF(ISTEXT(MATCH(J2,H:H,0)),VLOOKUP(J2,A:H,1,0),"")

Microsoft 365 and Office | Excel | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

Answer accepted by question author

Ashish Mathur 101.9K Reputation points Volunteer Moderator
2015-05-07T04:34:15+00:00

Hi,

Try this

=INDEX($A$2:$A$6,MATCH(1,INDEX(($H$2:$H$6=J2)*($E$2:$E$6="Yes"),,),0),1)

Hope this helps.

Was this answer helpful?

0 comments No comments

Answer accepted by question author

Ashish Mathur 101.9K Reputation points Volunteer Moderator
2015-05-07T03:10:57+00:00

Hi,

Try this formula in cell L2 and copy down

=INDEX($A$2:$A$6,MATCH(J2,$H$2:$H$6,0),1)

Hope this helps.

Was this answer helpful?

0 comments No comments

2 additional answers

Sort by: Most helpful
  1. Anonymous
    2015-05-08T00:30:20+00:00

    Hi Ashish,

    The both codes work perfect.

    Thanks,

    Magia

    Was this answer helpful?

    0 comments No comments
  2. Anonymous
    2015-05-07T03:40:51+00:00

    Hi,

    I try to add another condition in the function but not work correctly with this condition. Help

    =INDEX(A:A,MATCH(J2,H:H,E:E="YES"),1)

    Was this answer helpful?

    0 comments No comments