Help extracting selected rows from a table

JenniferMurphy

Well-known Member
Joined
Jul 23, 2011
Messages
2,532
Office Version
  1. 365
Platform
  1. Windows
Suppose I have a table like the one on the left. Is there a way I can create another table like the one on the right containing just the rows with "Yes" in the Tax column? Thanks

Donations & RMD.xlsx
BCDEFGHIJKLMN
5DateAccountCheck#ToAmountTax?DateAccountCheck#ToAmountTax?
601/23/21Brokerage1443Checking$100.00No02/14/21SEP-IRA43-255-1276Red Cross$75.00Yes
702/03/21Checking2384Girl Scout Cookies$50.00No06/12/21Brokerage1444NPR$150.00Yes
802/14/21SEP-IRA43-255-1276Red Cross$75.00Yes07/09/21SEP-IRA67-003-9202Molly's School$500.00Yes
903/22/21Checking2385Johnny's Auto$125.00No
1004/15/21Checking2386Grandma$200.00No
1106/12/21Brokerage1444NPR$150.00Yes
1207/09/21SEP-IRA67-003-9202Molly's School$500.00Yes
1308/12/21Checking2387Disneyland$250.00No
MrExcel3
 
OK. After a little more fiddling around, I have several tables that seem to work and achieve most of my original objectives.

In the mini-sheet below, I have 3 derivative tables, one for tax items on the right, another identical one below, and one for gift items under that. If this is too crowded, either of these derivative tables can go onto a different sheet.

I don't know why the Gift? column in the Tax tables and the Tax? column in the Gift table contain 0s. I suppose I could eliminate both of those columns in the derivative tables, but I don't have time to test that right now.

I put a blank line between the vertical tables but had to put at least 1 character in one of the cells within the table columns or the table would eat it if expanded.

All in all, a very nice feature. Thanks for pointing it out to me.

Filter Function.xlsx
BCDEFGHIJKLMNOP
3Complete ListTax Items
4DateAccountCheck#ForAmountTax?Gift?DateAccountCheck#ForAmountTax?Gift?
501/23/21Brokerage1443Checking$100.0002/14/21SEP-IRA43-255-1276Red Cross$75.00Yes0
602/03/21Checking2384Girl Scout Cookies$50.0006/12/21Brokerage1444NPR$150.00yes0
702/14/21SEP-IRA43-255-1276Red Cross$75.00Yes07/09/21SEP-IRA67-003-9202Molly's School$500.00Yes0
803/22/21Checking2385Johnny's Auto$125.0012/01/21Checking2388PBS$25.00yEs0
904/15/21Checking2386Grandma$200.00Yes12/02/21SEP-IRA73-357-6478EMILY'S List$150.00Yes0
1006/12/21Brokerage1444NPR$150.00yes12/04/21SEP-IRA77-191-2157Lincoln Project$50.00Yes0
1107/09/21SEP-IRA67-003-9202Molly's School$500.00Yes
1208/12/21Checking2387Disneyland$250.00
1312/01/21Checking2388PBS$25.00yEs
1412/02/21SEP-IRA73-357-6478EMILY'S List$150.00Yes
1512/03/21Checking2389Home Depot$89.00
1612/04/21SEP-IRA77-191-2157Lincoln Project$50.00Yes
1712/21/21Checking2390Destroyed$0.00
18Tax Items$950.00
19Gift Items$200.00
20---
21Tax Items
22DateAccountCheck#ForAmountTax?Gift?
2302/14/21SEP-IRA43-255-1276Red Cross$75.00Yes0
2406/12/21Brokerage1444NPR$150.00yes0
2507/09/21SEP-IRA67-003-9202Molly's School$500.00Yes0
2612/01/21Checking2388PBS$25.00yEs0
2712/02/21SEP-IRA73-357-6478EMILY'S List$150.00Yes0
2812/04/21SEP-IRA77-191-2157Lincoln Project$50.00Yes0
29
30---
31Gift Items
32DateAccountCheck#ForAmountTax?Gift?
3304/15/21Checking2386Grandma$200.000Yes
Sheet3
Cell Formulas
RangeFormula
J4:P4,B32:H32,B22:H22J4=Expenses[#Headers]
J5:P10,B23:H28J5=FILTER(Expenses,Expenses[Tax?]="Yes","")
F18F18=SUMIFS([Amount],[Tax?],"yes")
F19F19=SUMIFS(Expenses[Amount],Expenses[Gift?],"yes")
B33:H33B33=FILTER(Expenses,Expenses[Gift?]="Yes","")
Dynamic array formulas.
 
Upvote 0

Excel Facts

Can you sort left to right?
To sort left-to-right, use the Sort dialog box. Click Options. Choose "Sort left to right"
I would probably stick with that for the headers and have the separate formula for the other table data. However, it is possible to do headers and table data all in one if you want. See below.
Thanks, I'll study that when I have more time.
In terms of Date/Number etc formatting, unless there is a specific reason not to, I would format the whole column. If you format sections of a column, Excel needs to remember individual formatting for the various cells in the column. If you format the whole column, it only needs to remember one for the column. This can help reduce file bloat.
Good point. Probably also makes it run a bit faster.
It can be achieved with conditional formatting. See below.
Another feature for my todo list.
I am surprised that this was "discovery" to you, along with this whole sub-table issue, since much of it was discussed in this other thread of yours.
I did look at that but missed the part about the filter function. I don't always get everything everyone says the first time. ?
Consider putting the sum at the top - it is more likely to be readily visible there anyway if your table gets at all big as it would be common in that situation to freeze some rows at the top of the sheet. Two options for that sum in my mini-sheet.
I tried that, but ended up putting is under the master table as I show in my post that I was working when yours came in. I could do both!
Anyway, here is an option that covers most of what you are wanting as I understand it.
J5:O5 I formatted blue manually (by format-painting from B5:G5). This formatting would not automatically expand to P5 if the original table gets a new column added to it in col H.

The Conditional Formatting shown needs to be applied as far down as you think you will ever need.
Thanks. I think I have what I need right now. I am already a couple of weeks late getting taxes info together and my tax person is nagging me.
 
Upvote 0

Forum statistics

Threads
1,215,012
Messages
6,122,682
Members
449,091
Latest member
peppernaut

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top