Filter Multiple Columns and List Column Headers in Array

zjamespryor

New Member
Joined
Aug 7, 2014
Messages
12
Office Version
  1. 365
Platform
  1. Windows
Hello All,

I am using Google Sheets for this project. I have a dataset with many columns that have similar values. In the example below, they are "Gold," "Silver," and "Bronze." I need to filter my data by the person's "Name," and return the column headers in a list. I have almost 100 columns of "sports" in my data, which is why I need to filter the results down rather than just being able to list out each "sport" individually. Thank you for any help with this you can offer.
Book1
ABCDEFGHIJ
1
2Select Person ->JamesDataset
3SchoolNameTrackWrestlingGolfBaseball
4Sports (Desired Results)MedalsVirginiaJamesGoldSilverBronze
5TrackGoldCaliforniaDanBronzeGoldSilver
6GolfSilverNebraskaBillSilverGoldBronze
7BaseballBronzeFloridaFrankBronzeSilverGold
Sheet1
Cells with Data Validation
CellAllowCriteria
B2List=$F$4:$F$7
 

Excel Facts

Why are there 1,048,576 rows in Excel?
The Excel team increased the size of the grid in 2007. There are 2^20 rows and 2^14 columns for a total of 17 billion cells.
Try...

A5:

Excel Formula:
=TRANSPOSE(FILTER($G$3:$J$3,LEN(INDEX($G$4:$J$7,MATCH($B$2,$F$4:$F$7,0),0))>0))

B5:

Excel Formula:
=TRANSPOSE(LET(Metals,INDEX($G$4:$J$7,MATCH($B$2,$F$4:$F$7,0),0),FILTER(Metals,LEN(Metals)>0)))

Hope this helps!
 
Upvote 0
Solution
Works great! The answer is always simpler than I think. I'm unfamiliar with using LEN so I'm going to have to practice with it some. Google Sheets doesn't allow LET, but I was able to fill-in FILTER with the INDEX your provided and it works great.
 
Upvote 0
That's great, I'm glad you were able to work it so that it worked for you.

Cheers!
 
Upvote 0

Forum statistics

Threads
1,223,883
Messages
6,175,168
Members
452,615
Latest member
bogeys2birdies

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