Home > Net >  Google Sheets - Index, Match formula from multiple columns
Google Sheets - Index, Match formula from multiple columns

Time:11-13

I got a problem with one fromula.

Two sheets:

Look at formula on 2nd sheet B2

=IFERROR(INDEX(Importrange("1sj7FlrO5ZbHkIUwtpkJdU3tokEBwEXRvyIpi6eVHig4","Sheet1!A:A"),
MATCH($A2,Importrange("1sj7FlrO5ZbHkIUwtpkJdU3tokEBwEXRvyIpi6eVHig4","Sheet1!B:B"), 0)), "Not ordered")

It is matching my status from 1st spreadsheet but only from B column. My question is how to add C column as well (add another match criteria). I want to have B and C together. Is it possible?

Thanks!

I've tried something like this but it is not working :

=INDEX("1sj7FlrO5ZbHkIUwtpkJdU3tokEBwEXRvyIpi6eVHig4","Sheet1!A:A"), MATCH($A2,Importrange("1sj7FlrO5ZbHkIUwtpkJdU3tokEBwEXRvyIpi6eVHig4","Sheet1!B:B"),
MATCH($A2,Importrange("1sj7FlrO5ZbHkIUwtpkJdU3tokEBwEXRvyIpi6eVHig4","Sheet1!C:C"), 0))

CodePudding user response:

=IFERROR(INDEX(Importrange("1sj7FlrO5ZbHkIUwtpkJdU3tokEBwEXRvyIpi6eVHig4","Sheet1!A:A"),MATCH($A2,Importrange("1sj7FlrO5ZbHkIUwtpkJdU3tokEBwEXRvyIpi6eVHig4","Sheet1!B:B"), 0)), IFERROR(INDEX(Importrange("1sj7FlrO5ZbHkIUwtpkJdU3tokEBwEXRvyIpi6eVHig4","Sheet1!A:A"), MATCH($A2,Importrange("1sj7FlrO5ZbHkIUwtpkJdU3tokEBwEXRvyIpi6eVHig4","Sheet1!C:C"), 0)), "Not ordered"))

Try this! I joined a second exact formula as yours in the second parameter of the first IFERROR

CodePudding user response:

It'd probably be easier to just do a an OR statement. So something like this.

=If(Or(isnumber(firstcolumnLookupFormula),
  isnumber(SecondColumnLookupFormula)),"Ordered","Not Ordered").

You could do as many as needed then.

  • Related