Ask Your Question
0

Column lookup and print rows

asked 2016-07-09 17:48:57 +0200

siva gravatar image

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.

edit retag flag offensive close merge delete

Comments

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.

Lupp gravatar imageLupp ( 2016-07-09 22:49:21 +0200 )edit

1 Answer

Sort by » oldest newest most voted
0

answered 2016-07-10 00:36:41 +0200

Lupp gravatar image

updated 2016-07-10 00:37:13 +0200

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

edit flag offensive delete link more

Comments

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

siva gravatar imagesiva ( 2016-07-10 04:58:55 +0200 )edit

i figured it out. thanks

siva gravatar imagesiva ( 2016-07-10 11:03:15 +0200 )edit
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2016-07-09 17:48:57 +0200

Seen: 38 times

Last updated: Jul 10 '16