Hi,
I have two pages: groups and listing. From the listing page, I want to generate a list according to a search criterion. The groups page has three columns per group, because a name can have two assignments. I put a drop-down list with the search criteria.
I can't do this with a matrix formula I have which unfortunately is not reliable. I don't know LibreOffice enough to do this myself. It requires a good knowledge of LO which I don’t have.
Please, can you help me?
Thank you.
[Solved] Generating a name list based on a criterion
[Solved] Generating a name list based on a criterion
- Attachments
-
- listings_groups.ods
- (12.26 KiB) Downloaded 62 times
Last edited by patweb on Tue Nov 19, 2024 11:45 pm, edited 1 time in total.
LibreOffice Community version: 24.8.3 (X86_64) Windows 11 Pro
- MrProgrammer
- Moderator
- Posts: 5430
- Joined: Fri Jun 04, 2010 7:57 pm
- Location: Wisconsin, USA
Re: Generating a name list based on a criterion
You did not indicate what that would be so I have guessed that you will be searching for a single assignment.
What cell in your attachment has that drop-down? I wasn't able to find it.
The fundamental problem is that the data layout which you have chosen on the groups sheet will be very difficult to work with in Calc. I do not offer to help if you want to use that layout. Instead, put your data in a simple list with headers in row 1 and columns for Category, Name, and Assignment. Then you can immediately use Data → Autofilter on the Assignment column to apply a filter. No complicated formulas are needed. I've attached an example for you. Bonus: A name is not limited to only two assignments.
If you want a list closer to what you show on your listing sheet you can create a pivot table from my Data sheet. Row goes in the Row fields, Category goes in the Column fields, Assign goes in the Page fields, and Row goes again in the Data fields where it will be shown as Sum - Row. I set the Page fields filter to PP. To see the names for PP select B6:G19 in the pivot table, Edit → Find & Replace → More options, select Current selection only and Regular Expressions, Search for .+, Replace with =Data.C&, Replace All. I recommend unchecking Current selection only and Regular expressions, before clicking Close. Yes, you put the equal sign and the ampersand in the Replace with box. You can probably record a macro to perform that replacement. Restore the pivot table for a different Assign choice for the filter with Data → Pivot Table → Refresh.
Calc Guide Chapter 8 - Using a Pivot Table (formerly called Data Pilot)
[Tutorial] Favorite Recorded Calc Macros
If this solved your problem please go to your first post use the Edit ✏️ button and add [Solved] to the start of the Subject field. Select the green checkmark icon at the same time.
[Tutorial] Ten concepts that every Calc user should know
Mr. Programmer
AOO 4.1.7 Build 9800, MacOS 13.7.8, iMac Intel. The locale for any menus or Calc formulas in my posts is English (USA).
AOO 4.1.7 Build 9800, MacOS 13.7.8, iMac Intel. The locale for any menus or Calc formulas in my posts is English (USA).
Re: Generating a name list based on a criterion
MrProgrammer wrote: ↑Tue Nov 19, 2024 6:35 pm What cell in your attachment has that drop-down? I wasn't able to find it.
- Attachments
-
- drop-down.png (1.96 KiB) Viewed 1003 times
Last edited by MrProgrammer on Tue Nov 19, 2024 8:01 pm, edited 1 time in total.
Reason: Fix badly formatted quote
Reason: Fix badly formatted quote
LibreOffice Community version: 24.8.3 (X86_64) Windows 11 Pro