Column lookup and print rows

hi,

could you help assist the below query.

i have a value(Value1) to lookup and the spreadsheet has 20 columns( Column1,Column2,…,Column20 ).
The spreadsheet has 15 rows.
Column2 tittle is equal to Value1.

how to lookup Value1 in the Column Tittles and print the values of all 15 rows?. i.e. if the column1 tittle matches the lookup value, need to print all the rows in the column.

regards
Siva.

Do you want to actually print or mainly to show the results of the query in a specific range (and possibly print them subsequently)?
In the first case you will need to set the range for printing depending on the lookup result. This can only be automatised by user code (“macro”).
I would suggest to go the second way, and to set the ‘specific range’ as print range.
I will advise more detailed when knowing your answer.

The attached example is not based on a sheet exactly as it was described, but it will be easily adaptable to it.
There are two main steps:

  1. Match the chosen column label against the array of column labels.
  2. Access the chosen range (column) as an array using OFFSET in array mode.
    ask73054SelectForPrint001.ods

thank you. appreciated your help. it helps

i have one more requirement in the spreadsheet… the spreadsheet has fixed set of columns before the Column lookup. would it possible to print the matching rows from the fixed set of column alongwith the match column rows ?

for eg. in the spreadsheet the column lookup starts from F. i have common data in Columns B,C,D,E and i want that rows to be printed along with matched column rows respectively. would it be possible ?

thanks

i figured it out. thanks