-1

This seems rather simple be cannot currently find a solve for this.

I am currently in a spreadsheet, which has a column that is returning a binary value on the basis of random sampling.

I need to lookup the value '1', in this column and return all matching values from another 'item number' column in the same sheet.

I have tried XLOOKUP and Index Match, but they seem to just be returning the first value in the item number column, where I need each value returned in its own row.

Thanks in advance!

XLOOKUP, INDEX MATCH

4
  • "=if(A1=1,1,0)" and drag down.
    – Solar Mike
    Commented Apr 29 at 5:19
  • Thanks Mike, I need to return the item number, not 1's and 0's though
    – pycharge
    Commented Apr 29 at 5:48
  • How does your XLOOKUP and INDEX/MATCH functions look? XLOOKUP will only return one value though, INDEX/MATCH can give multiple returns, but it requires a more advanced function ; possibly could you add some mockup data, using Table Markdown if possible.
    – Excellor
    Commented Apr 29 at 6:57
  • You may use Table to Markdown Generator to make tables as markdown and post them in questions. Please, add data example and expected output Commented Apr 29 at 11:14

1 Answer 1

2

Perhaps you want to use FILTER, like so:

=FILTER(B2:B10,A2:A10=1)

This filters your list to only include the rows were Column A = 1, and gives you all the matching values from Column B.

enter image description here

2
  • This still seems to only return the first case
    – pycharge
    Commented Apr 29 at 6:01
  • 2
    FILTER returns all matching rows, like in the screenshot. Check that you are referencing the correct columns. Update your question with a screenshot like mine if you can.
    – kevin
    Commented Apr 29 at 6:06

Not the answer you're looking for? Browse other questions tagged or ask your own question.