filter multiple columns

ExcelNewbie2020

Active Member
Joined
Dec 3, 2020
Messages
333
Office Version
  1. 365
Platform
  1. Windows
i have this source data. each event that has entries in 3 columns (country/time/date).

idk if this is possible.. i need to filter those 3 columns based on events..like if i choose a country in cell B25, it will automatically populate information related to that country..please see expected result.. thank you


Book1
ABCDEFGHIJKLMNOP
2source data
3eventcountrytime(min)datecountrytime(min)datecountrytime(min)datecountrytime(min)datecountrytime(min)date
4event 1Sierra Leone202-Apr-2024Romania3019-May-2024Sierra Leone6017-Apr-2024Sierra Leone1521-May-2024
5event 2Romania308-May-2024
6event 3North Macedonia303-Apr-2024Mexico206-May-2024
7event 4Ecuador3011-May-2024
8event 5
9event 6North Macedonia102-May-2024
10event 7Guatemala309-Apr-2024
11event 8Romania3022-Apr-2024Sierra Leone6030-Apr-2024Marshall Islands307-Apr-2024
12event 9Nicaragua3023-Apr-2024
13event 10
14event 11
15event 12Costa Rica2010-Apr-2024
16event 13Equatorial Guinea601-Apr-2024Cameroon3010-May-2024Sierra Leone2511-May-2024
17event 14Romania1011-May-2024
18event 15
19event 16Peru301-Apr-2024North Macedonia6015-May-2024
20event 17Sierra Leone6023-May-2024
21event 18Sierra Leone308-Apr-2024Egypt1510-Apr-2024
22
23
24expected result
25country selectionSierra Leone
26
27eventcountrytime(min)datecountrytime(min)datecountrytime(min)date
28event 1Sierra Leone202-Apr-2024Sierra Leone6017-Apr-2024Sierra Leone1521-May-2024
29event 2
30event 3
31event 4
32event 5
33event 6
34event 7
35event 8Sierra Leone6030-Apr-2024
36event 9
37event 10
38event 11
39event 12
40event 13Sierra Leone2511-May-2024
41event 14
42event 15
43event 16
44event 17Sierra Leone6023-May-2024
45event 18Sierra Leone308-Apr-2024
Sheet1
 

Excel Facts

How to create a cell-sized chart?
Tiny charts, called Sparklines, were added to Excel 2010. Look for Sparklines on the Insert tab.
Try:
Book1
ABCDEFGHIJKLMNOP
1source data
2eventcountrytime(min)datecountrytime(min)datecountrytime(min)datecountrytime(min)datecountrytime(min)date
3event 1Sierra Leone204/2/24Romania305/19/24Sierra Leone604/17/24Sierra Leone155/21/24
4event 2Romania305/8/24
5event 3North Macedonia304/3/24Mexico205/6/24
6event 4Ecuador305/11/24
7event 5
8event 6North Macedonia105/2/24
9event 7Guatemala304/9/24
10event 8Romania304/22/24Sierra Leone604/30/24Marshall Islands304/7/24
11event 9Nicaragua304/23/24
12event 10
13event 11
14event 12Costa Rica204/10/24
15event 13Equatorial Guinea604/1/24Cameroon305/10/24Sierra Leone255/11/24
16event 14Romania105/11/24
17event 15
18event 16Peru304/1/24North Macedonia605/15/24
19event 17Sierra Leone605/23/24
20event 18Sierra Leone304/8/24Egypt154/10/24
21
22
23expected result
24country selectionSierra Leone
25
26event
27event 1Sierra Leone204/2/24Sierra Leone604/17/24Sierra Leone155/21/24
28event 2
29event 3
30event 4
31event 5
32event 6
33event 7
34event 8Sierra Leone604/30/24
35event 9
36event 10
37event 11
38event 12
39event 13Sierra Leone255/11/24
40event 14
41event 15
42event 16
43event 17Sierra Leone605/23/24
44event 18Sierra Leone304/8/24
Sheet1
Cell Formulas
RangeFormula
B27:P44B27=LET(w,WRAPROWS(TOCOL(B3:P20),3),f,IF(CHOOSECOLS(w,1)=B24,w,""),WRAPROWS(TOCOL(f),COLUMNS(B2:P2),""))
Dynamic array formulas.
 
Upvote 0
Try:
Book1
ABCDEFGHIJKLMNOP
1source data
2eventcountrytime(min)datecountrytime(min)datecountrytime(min)datecountrytime(min)datecountrytime(min)date
3event 1Sierra Leone204/2/24Romania305/19/24Sierra Leone604/17/24Sierra Leone155/21/24
4event 2Romania305/8/24
5event 3North Macedonia304/3/24Mexico205/6/24
6event 4Ecuador305/11/24
7event 5
8event 6North Macedonia105/2/24
9event 7Guatemala304/9/24
10event 8Romania304/22/24Sierra Leone604/30/24Marshall Islands304/7/24
11event 9Nicaragua304/23/24
12event 10
13event 11
14event 12Costa Rica204/10/24
15event 13Equatorial Guinea604/1/24Cameroon305/10/24Sierra Leone255/11/24
16event 14Romania105/11/24
17event 15
18event 16Peru304/1/24North Macedonia605/15/24
19event 17Sierra Leone605/23/24
20event 18Sierra Leone304/8/24Egypt154/10/24
21
22
23expected result
24country selectionSierra Leone
25
26event
27event 1Sierra Leone204/2/24Sierra Leone604/17/24Sierra Leone155/21/24
28event 2
29event 3
30event 4
31event 5
32event 6
33event 7
34event 8Sierra Leone604/30/24
35event 9
36event 10
37event 11
38event 12
39event 13Sierra Leone255/11/24
40event 14
41event 15
42event 16
43event 17Sierra Leone605/23/24
44event 18Sierra Leone304/8/24
Sheet1
Cell Formulas
RangeFormula
B27:P44B27=LET(w,WRAPROWS(TOCOL(B3:P20),3),f,IF(CHOOSECOLS(w,1)=B24,w,""),WRAPROWS(TOCOL(f),COLUMNS(B2:P2),""))
Dynamic array formulas.
thanks man..really appreciate it.. maybe its possible to move the values to the left?
1714396191813.png
 
Upvote 0
Yes, but it has a character limit of ~32,000 characters. Try:
Excel Formula:
=LET(
w,WRAPROWS(TOCOL(B3:P20),3),
f,IF(CHOOSECOLS(w,1)=B24,w,""),
k,WRAPROWS(TOCOL(f),COLUMNS(B2:P2),""),
TEXTSPLIT(TEXTJOIN(",",FALSE,BYROW(k,LAMBDA(br,TEXTJOIN("|",TRUE,br)))),"|",",",FALSE,,""))
 
Upvote 0
Yes, but it has a character limit of ~32,000 characters. Try:
Excel Formula:
=LET(
w,WRAPROWS(TOCOL(B3:P20),3),
f,IF(CHOOSECOLS(w,1)=B24,w,""),
k,WRAPROWS(TOCOL(f),COLUMNS(B2:P2),""),
TEXTSPLIT(TEXTJOIN(",",FALSE,BYROW(k,LAMBDA(br,TEXTJOIN("|",TRUE,br)))),"|",",",FALSE,,""))
thanks again but it convert the date and the time into text. tried format cells but it did nothing..
1714397360229.png
 
Upvote 0
How about this?
Excel Formula:
=LET(
w,WRAPROWS(TOCOL(B3:P20),3),
f,IF(CHOOSECOLS(w,1)=B24,w,""),
k,WRAPROWS(TOCOL(f),COLUMNS(B2:P2),""),
t,TEXTSPLIT(TEXTJOIN(",",FALSE,BYROW(k,LAMBDA(br,TEXTJOIN("|",TRUE,br)))),"|",",",FALSE,,""),IFERROR(--t,t))
 
Upvote 0
Solution
How about this?
Excel Formula:
=LET(
w,WRAPROWS(TOCOL(B3:P20),3),
f,IF(CHOOSECOLS(w,1)=B24,w,""),
k,WRAPROWS(TOCOL(f),COLUMNS(B2:P2),""),
t,TEXTSPLIT(TEXTJOIN(",",FALSE,BYROW(k,LAMBDA(br,TEXTJOIN("|",TRUE,br)))),"|",",",FALSE,,""),IFERROR(--t,t))
it works..thanks man..
 
Upvote 0

Forum statistics

Threads
1,223,214
Messages
6,170,772
Members
452,353
Latest member
strainu

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