[Office Professional 2021] I have an Excel workbook made of 2 sheets:
--1st sheet is named Database_locale and it had a table that has data from column A to column L and this database is updated every day so now it has about 12000 rows but it will increase over time.
--2nd sheet is called Ricerca and it has a cell (C6) in which i can type anything but i'm looking for names in this case. In a separate cell in this same sheet i have the formula that actually looks up the the values and returns them.
What it needs to do is look for all the cells in sheet Database_locale in column B (where all the names are) and return all the rows that match the name i looked for.
I tried this first:
=FILTER(Database_locale!A2:L1000000; ISNUMBER(SEARCH("*"&C6&"*"; Database_locale!B2:B1000000)))
Which works and returns all the columns from A to L and all the rows that match as expected.
Now what i'm trying to do is to display only some of the columns (1,2 and 5) to get rid of some unnecessary data so i used the index function like this:
=INDEX(FILTER(Database_locale!A2:L1000000; ISNUMBER(SEARCH("*"&C6&"*"; Database_locale!B2:B1000000)));; 1)
Which works fine and returns only column 1.
The problem is that if i add any more columns to display it doesen't work as expected. I tried:
=INDEX(FILTER(Database_locale!A2:L1000000; ISNUMBER(SEARCH("*"&C6&"*"; Database_locale!B2:B1000000)));; {1;2;5})
or
=INDEX(FILTER(Database_locale!A2:L1000000; ISNUMBER(SEARCH("*"&C6&"*"; Database_locale!B2:B1000000)));; [1;2;5])
Both give different errors or partially work but in a very strange manner, i've tried many more combinations but listing every one and explaining what they do would be very long to read.
I could just use the formula that diaplays one column correctly and add one for every other column that i need to display but the sheet becomes sluggish.
Probably i'm doing a silly mistake and can't notice it but i've tried for hours and can't get it to work in a single formula to display all the columns that i need.
Thanks in advance and sorry for my english!






INDEX, tryCHOOSECOLS