Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Extract lines from table into new table

EngDM

Technical User
Sep 13, 2024
1
0
1
Hello! Regular Eng-Tips user checking in.

I have created a spreadsheet that calculates steel beam strength, and then performs true/false checks to see if it passes my input criteria. What I would like to do, is some how extract all of the lines that are "True" for all checks (right now I have an If(And)) statement checking if all checks are true) and return them to a different table as a sort of summary of everything that would meet my criteria.

I'm not sure if there is a certain table type that can easily do this, but I have also considered using VBA and recording a macro. For the macro route I am getting hung up on the last step.

The plan for the macro would be to copy the whole table to my summary page, sort the table by the true/false check column and delete all false entries. My issue is, since the number of false entries can change I can't really record a macro to do this, since I may be deleting too many lines.

Another option I have been exploring is the filter function, and then using choosecols to specify what columns to return (to get rid of the extra columns I don't need in my summary). The issue is, it appears to be returning everything and not actually filtering. Here is the line:

=CHOOSECOLS(FILTER(W_Properties,(Mr>Mf_req)+(Ix>Ix_req)+(Sections!N5:N293<max_d)+(Sections!O5:O293<max_b),""),1,3,4,14,15,35)

Where W_Properties, Mr and Ix are defined arrays already. I could define a d array and b array to pair with my max_d and max_b check.


You know when you are looking for something and then you ask for help and immediately find it? Yea.
 
Last edited:
Could you share your table structures? Do you have a table with multiple true/false fields for checks? If so, this would be “committing spreadsheet”.

We need more clarifications. Typically records aren’t deleted, they are simply filtered out of forms and reports.
 
I have created a spreadsheet that calculates steel beam strength, and then performs true/false checks to see if it passes my input criteria.
I hope your "spreadsheet" is a table and better yet, a Structured Table via Insert > Tables > Table.
Please display the structure of your table.
 

Part and Inventory Search

Sponsor

Back
Top