Lookup to return multiple rows
I have a sheet containing invoices for all projects (one invoice per row). I'd like to have a separate sheet which returns all the invoices listed against a single project code (with each invoice still on its own line - basically a filter with the criteria set by a cell reference). Is there a lookup which can do this?
A report would do this but only for all projects, not just one.
Answers
-
You could use a report and set a filter for that specific project code.
-
We have hundreds of projects - it would mean creating a report for each one. Looking for something more dynamic.
-
Hi @timshaw
I agree that it sounds like a report is best in this scenario... however what I would do is Group by the Projects so you can collapse all those rows, then only expand the one Project you want to see the line items for.
Otherwise, you could use a JOIN(COLLECT formula to bring together all the content into one cell, based on the project code listed in another cell (so you could change the code and it would auto-update). The difference here is that the formula can't parse this out by row, it gathers the information into a cell.
A final alternative would be to have a column with numbers listed (1 - however many). Then you could use this column as a reference in an INDEX(COLLECT formula, to bring back different data per-cell (e.g. if it's the first match, the second match, the third...)
=INDEX(COLLECT({Invoice Column}, {Project Column}, [Project Name]@row), [Number Column]@row)
Let me know if you'd like a more detailed explanation of this last formula and I'd be happy to post some screen captures.
Cheers,
Genevieve
Need more help? 👀 | Help and Learning Center
こんにちは (Konnichiwa), Hallo, Hola, Bonjour, Olá, Ciao! 👋 | Global Discussions
-
I am trying to do something very similar to create a purchase order from a parts database would you mind sharing a few screenshots of the Index Collect formula you are referencing. I think it would work for my application.
Thank you,
Brandon
-
Hey @Bwoods113
I have an example of this with a screen capture on this other post, here:
Let me know if that helps!
Cheers,
Genevieve
Need more help? 👀 | Help and Learning Center
こんにちは (Konnichiwa), Hallo, Hola, Bonjour, Olá, Ciao! 👋 | Global Discussions
-
Good Morning, @Genevieve P.
I feel like I am close on this and if I can get it working it is going to genrate exactly what I want, I am getting an error on the formula. I attached a screenshot of what I have. I am trying to have it look up the equipment ID, then use the helper row, and report back the part number. Then I am hoping to copy that formula to return the rest of the part numbers and quantities. Any help would be greatly appreciated. Thank you for your time.
Bwoods113
-
Hi @Bwoods113
It looks like we just need to rearrange the placement of your {references} and criteria.
The structure should be like this:
=INDEX(DISTINCT(COLLECT({Column to return}, {Column with criteria}, "Criteria")), rownumber)
Try this:
=INDEX(DISTINCT(COLLECT({Parts Database Range 3}, {Parts Database Range 2}, [Primary Column]@row)), Helper@row)
This is assuming Range 3 is your column with "372" listed and Range 2 is the yellow column.
Cheers,
Genevieve
Need more help? 👀 | Help and Learning Center
こんにちは (Konnichiwa), Hallo, Hola, Bonjour, Olá, Ciao! 👋 | Global Discussions
-
=INDEX(DISTINCT(COLLECT({Parts Database Range 3}, {Parts Database Range 2}, [Primary Column]@row,)) Helper@row)
This gives me #UNPARSABLE
=INDEX(DISTINCT(COLLECT({Parts Database Range 3}, {Parts Database Range 2}, [Primary Column]1)), Helper@row)
This gives me invalid value, I apologize I just cant tell where the error is.
UPDATE: I got it I had the references backwards Thank you so much
-
Hey @Bwoods113
Glad you got it working! 🙂
Need more help? 👀 | Help and Learning Center
こんにちは (Konnichiwa), Hallo, Hola, Bonjour, Olá, Ciao! 👋 | Global Discussions
-
Genevieve - Trying to do something very similar. I have a sheet (Weldment BOM) with "Stock Code" that appears multiple times and I want to pull over every time that same Stock Code occurs the "Raw P/N" from (Part 3) sheet.
=INDEX(DISTINCT(COLLECT({Part 3 Raw P/N}, {Part 3 Parent P/N}, [Stock Code PMI #]@row)), Helper@row)
I'm getting "#Invalid Value" returned
-
@LakeWaconia Try a JOIN/COLLECT instead.
Categories
- All Categories
- 14 Welcome to the Community
- Customer Resources
- 64.8K Get Help
- 434 Global Discussions
- 138 Industry Talk
- 470 Announcements
- 4.9K Ideas & Feature Requests
- 129 Brandfolder
- 148 Just for fun
- 65 Community Job Board
- 486 Show & Tell
- 33 Member Spotlight
- 2 SmartStories
- 300 Events
- 36 Webinars
- 7.3K Forum Archives