Populate a list with specific fields using Filter function

zinah

Active Member
Joined
Nov 28, 2018
Messages
355
Office Version
  1. 365
Platform
  1. Windows
Hello everyone,

I have below table that can populate employee names using filter function, what I need to add is populating specific fields (like country and full time/part time fields) along with employee names. Is there anyway that I can do that using the same filter formula but adding more criteria to the function that can populate data whenever I add any fields name that match the data table field names?


Filter with mulitple criteria .xlsx
ABCDEFGHIJKLMNO
1Employee IDEmployee NameEmployee's ManagerCountryRegionTypeFull Time / Part timeStatusManagers Table
21AJJArgentinaLTAMRPart timeYJJEmployee NameCountryFull Time / Part time
32BKKIrelandEMEARPart timeYKKA
43CLLIrelandEMEARFull timeYLLB
54DMMIrelandEMEARFull timeNMMC
65ENNIrelandEMEARFull timeNNNM
76FOOIrelandEMEARFull timeNOON
87GPPIrelandEMEARFull timeNPPO
98HJJSpainEMEARFull timeNZ
109IKKSwedenEMEARFull timeNAA
1110JLLArgentinaLTAMRFull timeNBB
1211KMMUnited States of AmericaUS & CanadaRFull timeN
1312LNNUnited States of AmericaUS & CanadaRFull timeN
1413MOOUnited States of AmericaUS & CanadaRFull timeY
1514NPPUnited States of AmericaUS & CanadaRFull timeY
1615OJJUnited States of AmericaUS & CanadaRFull timeY
1716PKKSpainEMEARFull timeN
1817QLLSwedenEMEARFull timeN
1918RMMSingaporeAPACRFull timeN
2019SNNSingaporeAPACRFull timeN
2120TOOSpainEMEARFull timeN
2221UPPSwedenEMEARFull timeN
2322VJJUnited Arab EmiratesEMEARFull timeN
2423XKKUnited Arab EmiratesEMEARFull timeN
2524YLLUnited Arab EmiratesEMEARFull timeN
2625ZMMArgentinaLTAMRFull timeY
2726AANNUnited KingdomEMEARFull timeY
2827BBOOUnited States of AmericaUS & CanadaRFull timeY
2928CCPPUnited States of AmericaUS & CanadaRFull timeN
3029DDJJUnited States of AmericaUS & CanadaRFull timeN
3130EEKKUnited States of AmericaUS & CanadaRFull timeN
3231FFLLUnited States of AmericaUS & CanadaCFull timeN
3332KKKY21United States of AmericaUS & CanadaRFull timeN
3433LLLY21United Arab EmiratesEMEARPart timeN
3534PPPY21United Arab EmiratesEMEARPart timeN
3635UUUY21ArgentinaLTAMRPart timeN
3736RRRY21United KingdomEMEARPart timeN
3837TTTK21United KingdomEMEACPart timeY
3938SSSK21SingaporeAPACRPart timeY
4039S21K21SpainEMEARPart timeY
4140S45K21SwedenEMEARFull timeY
Sheet1
Cell Formulas
RangeFormula
M3:M11M3=FILTER(B2:B41,(COUNTIF(J2:J8,C2:C41))*(F2:F41="R")*(H2:H41="Y"))
Dynamic array formulas.
 

Excel Facts

Copy PDF to Excel
Select data in PDF. Paste to Microsoft Word. Copy from Word and paste to Excel.
Excel Formula:
=FILTER(CHOOSECOLS(B2:G41,1,3,6),(COUNTIF(J2:J8,C2:C41))*(F2:F41="R")*(H2:H41="Y"))
 
Upvote 0
Try

Book5
ABCDEFGHIJKLMNOP
1Employee IDEmployee NameEmployee's ManagerCountryRegionTypeFull Time / Part timeStatusManagers Table
21AJJArgentinaLTAMRPart timeYJJEmployee NameCountryFull Time / Part time
32BKKIrelandEMEARPart timeYKKAArgentinaPart time
43CLLIrelandEMEARFull timeYLLBIrelandPart time
54DMMIrelandEMEARFull timeNMMCIrelandFull time
65ENNIrelandEMEARFull timeNNNMUnited States of AmericaFull time
76FOOIrelandEMEARFull timeNOONUnited States of AmericaFull time
87GPPIrelandEMEARFull timeNPPOUnited States of AmericaFull time
98HJJSpainEMEARFull timeNZArgentinaFull time
109IKKSwedenEMEARFull timeNAAUnited KingdomFull time
1110JLLArgentinaLTAMRFull timeNBBUnited States of AmericaFull time
1211KMMUnited States of AmericaUS & CanadaRFull timeN
1312LNNUnited States of AmericaUS & CanadaRFull timeN
1413MOOUnited States of AmericaUS & CanadaRFull timeY
1514NPPUnited States of AmericaUS & CanadaRFull timeY
1615OJJUnited States of AmericaUS & CanadaRFull timeY
1716PKKSpainEMEARFull timeN
1817QLLSwedenEMEARFull timeN
1918RMMSingaporeAPACRFull timeN
2019SNNSingaporeAPACRFull timeN
2120TOOSpainEMEARFull timeN
2221UPPSwedenEMEARFull timeN
2322VJJUnited Arab EmiratesEMEARFull timeN
2423XKKUnited Arab EmiratesEMEARFull timeN
2524YLLUnited Arab EmiratesEMEARFull timeN
2625ZMMArgentinaLTAMRFull timeY
2726AANNUnited KingdomEMEARFull timeY
2827BBOOUnited States of AmericaUS & CanadaRFull timeY
2928CCPPUnited States of AmericaUS & CanadaRFull timeN
3029DDJJUnited States of AmericaUS & CanadaRFull timeN
3130EEKKUnited States of AmericaUS & CanadaRFull timeN
3231FFLLUnited States of AmericaUS & CanadaCFull timeN
3332KKKY21United States of AmericaUS & CanadaRFull timeN
3433LLLY21United Arab EmiratesEMEARPart timeN
3534PPPY21United Arab EmiratesEMEARPart timeN
3635UUUY21ArgentinaLTAMRPart timeN
3736RRRY21United KingdomEMEARPart timeN
3837TTTK21United KingdomEMEACPart timeY
3938SSSK21SingaporeAPACRPart timeY
4039S21K21SpainEMEARPart timeY
4140S45K21SwedenEMEARFull timeY
Sheet3
Cell Formulas
RangeFormula
M3:O11M3=FILTER(FILTER(B2:H41,(COUNTIF(J2:J8,C2:C41))*(F2:F41="R")*(H2:H41="Y")),{1,0,1,0,0,1,0})
Dynamic array formulas.
 
Upvote 0
Try

Book5
ABCDEFGHIJKLMNOP
1Employee IDEmployee NameEmployee's ManagerCountryRegionTypeFull Time / Part timeStatusManagers Table
21AJJArgentinaLTAMRPart timeYJJEmployee NameCountryFull Time / Part time
32BKKIrelandEMEARPart timeYKKAArgentinaPart time
43CLLIrelandEMEARFull timeYLLBIrelandPart time
54DMMIrelandEMEARFull timeNMMCIrelandFull time
65ENNIrelandEMEARFull timeNNNMUnited States of AmericaFull time
76FOOIrelandEMEARFull timeNOONUnited States of AmericaFull time
87GPPIrelandEMEARFull timeNPPOUnited States of AmericaFull time
98HJJSpainEMEARFull timeNZArgentinaFull time
109IKKSwedenEMEARFull timeNAAUnited KingdomFull time
1110JLLArgentinaLTAMRFull timeNBBUnited States of AmericaFull time
1211KMMUnited States of AmericaUS & CanadaRFull timeN
1312LNNUnited States of AmericaUS & CanadaRFull timeN
1413MOOUnited States of AmericaUS & CanadaRFull timeY
1514NPPUnited States of AmericaUS & CanadaRFull timeY
1615OJJUnited States of AmericaUS & CanadaRFull timeY
1716PKKSpainEMEARFull timeN
1817QLLSwedenEMEARFull timeN
1918RMMSingaporeAPACRFull timeN
2019SNNSingaporeAPACRFull timeN
2120TOOSpainEMEARFull timeN
2221UPPSwedenEMEARFull timeN
2322VJJUnited Arab EmiratesEMEARFull timeN
2423XKKUnited Arab EmiratesEMEARFull timeN
2524YLLUnited Arab EmiratesEMEARFull timeN
2625ZMMArgentinaLTAMRFull timeY
2726AANNUnited KingdomEMEARFull timeY
2827BBOOUnited States of AmericaUS & CanadaRFull timeY
2928CCPPUnited States of AmericaUS & CanadaRFull timeN
3029DDJJUnited States of AmericaUS & CanadaRFull timeN
3130EEKKUnited States of AmericaUS & CanadaRFull timeN
3231FFLLUnited States of AmericaUS & CanadaCFull timeN
3332KKKY21United States of AmericaUS & CanadaRFull timeN
3433LLLY21United Arab EmiratesEMEARPart timeN
3534PPPY21United Arab EmiratesEMEARPart timeN
3635UUUY21ArgentinaLTAMRPart timeN
3736RRRY21United KingdomEMEARPart timeN
3837TTTK21United KingdomEMEACPart timeY
3938SSSK21SingaporeAPACRPart timeY
4039S21K21SpainEMEARPart timeY
4140S45K21SwedenEMEARFull timeY
Sheet3
Cell Formulas
RangeFormula
M3:O11M3=FILTER(FILTER(B2:H41,(COUNTIF(J2:J8,C2:C41))*(F2:F41="R")*(H2:H41="Y")),{1,0,1,0,0,1,0})
Dynamic array formulas.
That's great suggestion, however, rather than using particular columns {1,0} can we use match function to match the columns header of the data with the populated filtered table? i.e., let's say the data fields increased or fields header name changes, can we use match function by matching the populated filtered table headers with the data fields header?
 
Upvote 0
Try

Book9
ABCDEFGHIJKLMNO
1Employee IDEmployee NameEmployee's ManagerCountryRegionTypeFull Time / Part timeStatusManagers Table
21AJJArgentinaLTAMRPart timeYJJEmployee NameCountryFull Time / Part time
32BKKIrelandEMEARPart timeYKKAArgentinaPart time
43CLLIrelandEMEARFull timeYLLBIrelandPart time
54DMMIrelandEMEARFull timeNMMCIrelandFull time
65ENNIrelandEMEARFull timeNNNMUnited States of AmericaFull time
76FOOIrelandEMEARFull timeNOONUnited States of AmericaFull time
87GPPIrelandEMEARFull timeNPPOUnited States of AmericaFull time
98HJJSpainEMEARFull timeNZArgentinaFull time
109IKKSwedenEMEARFull timeNAAUnited KingdomFull time
1110JLLArgentinaLTAMRFull timeNBBUnited States of AmericaFull time
1211KMMUnited States of AmericaUS & CanadaRFull timeN
1312LNNUnited States of AmericaUS & CanadaRFull timeN
1413MOOUnited States of AmericaUS & CanadaRFull timeY
1514NPPUnited States of AmericaUS & CanadaRFull timeY
1615OJJUnited States of AmericaUS & CanadaRFull timeY
1716PKKSpainEMEARFull timeN
1817QLLSwedenEMEARFull timeN
1918RMMSingaporeAPACRFull timeN
2019SNNSingaporeAPACRFull timeN
2120TOOSpainEMEARFull timeN
2221UPPSwedenEMEARFull timeN
2322VJJUnited Arab EmiratesEMEARFull timeN
2423XKKUnited Arab EmiratesEMEARFull timeN
2524YLLUnited Arab EmiratesEMEARFull timeN
2625ZMMArgentinaLTAMRFull timeY
2726AANNUnited KingdomEMEARFull timeY
2827BBOOUnited States of AmericaUS & CanadaRFull timeY
2928CCPPUnited States of AmericaUS & CanadaRFull timeN
3029DDJJUnited States of AmericaUS & CanadaRFull timeN
3130EEKKUnited States of AmericaUS & CanadaRFull timeN
3231FFLLUnited States of AmericaUS & CanadaCFull timeN
3332KKKY21United States of AmericaUS & CanadaRFull timeN
3433LLLY21United Arab EmiratesEMEARPart timeN
3534PPPY21United Arab EmiratesEMEARPart timeN
3635UUUY21ArgentinaLTAMRPart timeN
3736RRRY21United KingdomEMEARPart timeN
3837TTTK21United KingdomEMEACPart timeY
3938SSSK21SingaporeAPACRPart timeY
4039S21K21SpainEMEARPart timeY
4140S45K21SwedenEMEARFull timeY
Sheet1
Cell Formulas
RangeFormula
M3:O11M3=FILTER(FILTER(B2:H41,(COUNTIF(J2:J8,C2:C41))*(F2:F41="R")*(H2:H41="Y")),COUNTIF(M2:O2,B1:H1))
Dynamic array formulas.
 
Upvote 0
Try

Book9
ABCDEFGHIJKLMNO
1Employee IDEmployee NameEmployee's ManagerCountryRegionTypeFull Time / Part timeStatusManagers Table
21AJJArgentinaLTAMRPart timeYJJEmployee NameCountryFull Time / Part time
32BKKIrelandEMEARPart timeYKKAArgentinaPart time
43CLLIrelandEMEARFull timeYLLBIrelandPart time
54DMMIrelandEMEARFull timeNMMCIrelandFull time
65ENNIrelandEMEARFull timeNNNMUnited States of AmericaFull time
76FOOIrelandEMEARFull timeNOONUnited States of AmericaFull time
87GPPIrelandEMEARFull timeNPPOUnited States of AmericaFull time
98HJJSpainEMEARFull timeNZArgentinaFull time
109IKKSwedenEMEARFull timeNAAUnited KingdomFull time
1110JLLArgentinaLTAMRFull timeNBBUnited States of AmericaFull time
1211KMMUnited States of AmericaUS & CanadaRFull timeN
1312LNNUnited States of AmericaUS & CanadaRFull timeN
1413MOOUnited States of AmericaUS & CanadaRFull timeY
1514NPPUnited States of AmericaUS & CanadaRFull timeY
1615OJJUnited States of AmericaUS & CanadaRFull timeY
1716PKKSpainEMEARFull timeN
1817QLLSwedenEMEARFull timeN
1918RMMSingaporeAPACRFull timeN
2019SNNSingaporeAPACRFull timeN
2120TOOSpainEMEARFull timeN
2221UPPSwedenEMEARFull timeN
2322VJJUnited Arab EmiratesEMEARFull timeN
2423XKKUnited Arab EmiratesEMEARFull timeN
2524YLLUnited Arab EmiratesEMEARFull timeN
2625ZMMArgentinaLTAMRFull timeY
2726AANNUnited KingdomEMEARFull timeY
2827BBOOUnited States of AmericaUS & CanadaRFull timeY
2928CCPPUnited States of AmericaUS & CanadaRFull timeN
3029DDJJUnited States of AmericaUS & CanadaRFull timeN
3130EEKKUnited States of AmericaUS & CanadaRFull timeN
3231FFLLUnited States of AmericaUS & CanadaCFull timeN
3332KKKY21United States of AmericaUS & CanadaRFull timeN
3433LLLY21United Arab EmiratesEMEARPart timeN
3534PPPY21United Arab EmiratesEMEARPart timeN
3635UUUY21ArgentinaLTAMRPart timeN
3736RRRY21United KingdomEMEARPart timeN
3837TTTK21United KingdomEMEACPart timeY
3938SSSK21SingaporeAPACRPart timeY
4039S21K21SpainEMEARPart timeY
4140S45K21SwedenEMEARFull timeY
Sheet1
Cell Formulas
RangeFormula
M3:O11M3=FILTER(FILTER(B2:H41,(COUNTIF(J2:J8,C2:C41))*(F2:F41="R")*(H2:H41="Y")),COUNTIF(M2:O2,B1:H1))
Dynamic array formulas.
Thanks, that's perfect and exactly what I needed a flexible formula to accommodate any fields.
 
Upvote 0
You're welcome.

Glad we could help.

That COUNTIF trick I learned from @JvdV

Thanks @JvdV
So it was a win-win situation for all :)
One more Q, if I need to use SORT function to sort by specific column, let's say by country (which is the 2nd column) how can I do that?
 
Upvote 0
Try

Book6
ABCDEFGHIJKLMNOP
1Employee IDEmployee NameEmployee's ManagerCountryRegionTypeFull Time / Part timeStatusManagers Table
21AJJArgentinaLTAMRPart timeYJJEmployee NameCountryFull Time / Part time
32BKKIrelandEMEARPart timeYKKAArgentinaPart time
43CLLIrelandEMEARFull timeYLLZArgentinaFull time
54DMMIrelandEMEARFull timeNMMBIrelandPart time
65ENNIrelandEMEARFull timeNNNCIrelandFull time
76FOOIrelandEMEARFull timeNOOAAUnited KingdomFull time
87GPPIrelandEMEARFull timeNPPMUnited States of AmericaFull time
98HJJSpainEMEARFull timeNNUnited States of AmericaFull time
109IKKSwedenEMEARFull timeNOUnited States of AmericaFull time
1110JLLArgentinaLTAMRFull timeNBBUnited States of AmericaFull time
1211KMMUnited States of AmericaUS & CanadaRFull timeN
1312LNNUnited States of AmericaUS & CanadaRFull timeN
1413MOOUnited States of AmericaUS & CanadaRFull timeY
1514NPPUnited States of AmericaUS & CanadaRFull timeY
1615OJJUnited States of AmericaUS & CanadaRFull timeY
1716PKKSpainEMEARFull timeN
1817QLLSwedenEMEARFull timeN
1918RMMSingaporeAPACRFull timeN
2019SNNSingaporeAPACRFull timeN
2120TOOSpainEMEARFull timeN
2221UPPSwedenEMEARFull timeN
2322VJJUnited Arab EmiratesEMEARFull timeN
2423XKKUnited Arab EmiratesEMEARFull timeN
2524YLLUnited Arab EmiratesEMEARFull timeN
2625ZMMArgentinaLTAMRFull timeY
2726AANNUnited KingdomEMEARFull timeY
2827BBOOUnited States of AmericaUS & CanadaRFull timeY
2928CCPPUnited States of AmericaUS & CanadaRFull timeN
3029DDJJUnited States of AmericaUS & CanadaRFull timeN
3130EEKKUnited States of AmericaUS & CanadaRFull timeN
3231FFLLUnited States of AmericaUS & CanadaCFull timeN
3332KKKY21United States of AmericaUS & CanadaRFull timeN
3433LLLY21United Arab EmiratesEMEARPart timeN
3534PPPY21United Arab EmiratesEMEARPart timeN
3635UUUY21ArgentinaLTAMRPart timeN
3736RRRY21United KingdomEMEARPart timeN
3837TTTK21United KingdomEMEACPart timeY
3938SSSK21SingaporeAPACRPart timeY
4039S21K21SpainEMEARPart timeY
4140S45K21SwedenEMEARFull timeY
42
Sheet2
Cell Formulas
RangeFormula
M3:O11M3=SORT(FILTER(FILTER(B2:H41,(COUNTIF(J2:J8,C2:C41))*(F2:F41="R")*(H2:H41="Y")),COUNTIF(M2:O2,B1:H1)),2,1)
Dynamic array formulas.
 
Upvote 0
Solution
Try

Book6
ABCDEFGHIJKLMNOP
1Employee IDEmployee NameEmployee's ManagerCountryRegionTypeFull Time / Part timeStatusManagers Table
21AJJArgentinaLTAMRPart timeYJJEmployee NameCountryFull Time / Part time
32BKKIrelandEMEARPart timeYKKAArgentinaPart time
43CLLIrelandEMEARFull timeYLLZArgentinaFull time
54DMMIrelandEMEARFull timeNMMBIrelandPart time
65ENNIrelandEMEARFull timeNNNCIrelandFull time
76FOOIrelandEMEARFull timeNOOAAUnited KingdomFull time
87GPPIrelandEMEARFull timeNPPMUnited States of AmericaFull time
98HJJSpainEMEARFull timeNNUnited States of AmericaFull time
109IKKSwedenEMEARFull timeNOUnited States of AmericaFull time
1110JLLArgentinaLTAMRFull timeNBBUnited States of AmericaFull time
1211KMMUnited States of AmericaUS & CanadaRFull timeN
1312LNNUnited States of AmericaUS & CanadaRFull timeN
1413MOOUnited States of AmericaUS & CanadaRFull timeY
1514NPPUnited States of AmericaUS & CanadaRFull timeY
1615OJJUnited States of AmericaUS & CanadaRFull timeY
1716PKKSpainEMEARFull timeN
1817QLLSwedenEMEARFull timeN
1918RMMSingaporeAPACRFull timeN
2019SNNSingaporeAPACRFull timeN
2120TOOSpainEMEARFull timeN
2221UPPSwedenEMEARFull timeN
2322VJJUnited Arab EmiratesEMEARFull timeN
2423XKKUnited Arab EmiratesEMEARFull timeN
2524YLLUnited Arab EmiratesEMEARFull timeN
2625ZMMArgentinaLTAMRFull timeY
2726AANNUnited KingdomEMEARFull timeY
2827BBOOUnited States of AmericaUS & CanadaRFull timeY
2928CCPPUnited States of AmericaUS & CanadaRFull timeN
3029DDJJUnited States of AmericaUS & CanadaRFull timeN
3130EEKKUnited States of AmericaUS & CanadaRFull timeN
3231FFLLUnited States of AmericaUS & CanadaCFull timeN
3332KKKY21United States of AmericaUS & CanadaRFull timeN
3433LLLY21United Arab EmiratesEMEARPart timeN
3534PPPY21United Arab EmiratesEMEARPart timeN
3635UUUY21ArgentinaLTAMRPart timeN
3736RRRY21United KingdomEMEARPart timeN
3837TTTK21United KingdomEMEACPart timeY
3938SSSK21SingaporeAPACRPart timeY
4039S21K21SpainEMEARPart timeY
4140S45K21SwedenEMEARFull timeY
42
Sheet2
Cell Formulas
RangeFormula
M3:O11M3=SORT(FILTER(FILTER(B2:H41,(COUNTIF(J2:J8,C2:C41))*(F2:F41="R")*(H2:H41="Y")),COUNTIF(M2:O2,B1:H1)),2,1)
Dynamic array formulas.
Thank you so much @Sufiyan97
 
Upvote 0

Forum statistics

Threads
1,215,771
Messages
6,126,797
Members
449,337
Latest member
BBV123

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