Return list of all values that match Two criteriaExcel: VLOOKUP and INDEX+MATCH return #REFHow can I return a count of a specific criteria in a range of duplicated items?INDEX + MATCH function returning wrong valuesExcel INDEX MATCH Checking Multiple ColumnsExcel - Unique values from Index-Match-Large-If array formulaReturn list of all values that match criteriaExcel Index Match with Two Criteria, where 1 of the 2 criteria is match based on less than or equal toExcel formula to count the number of rows that meets one or more of many criteriaExcel - How to return different match values with other formulas?Excel formula to match multiple criteria

What does "sardine box" mean?

Why does Intel's Haswell chip allow FP multiplication to be twice as fast as addition?

Blocking people from taking pictures of me with smartphone

Find y in this equation

Who are these characters/superheroes in the posters from Chris's room in Family Guy?

Is TA-ing worth the opportunity cost?

English - Acceptable use of parentheses in an author's name

Simple Stop watch which i want to extend

Dropdowns & Chevrons for Right to Left languages

How are you supposed to know the strumming pattern for a song from the "chord sheet music"?

What gave Harry Potter the idea of writing in Tom Riddle's diary?

Trying to write a shell script that keeps testing a server remotely, but it keeps falling in else statement when I logout

Visa National - No Exit Stamp From France on Return to the UK

Can a fight scene, component-wise, be too complex and complicated?

Plausibility of Ice Eaters in the Arctic

Which I-94 date do I believe?

Why is transplanting a specific intact brain impossible if it is generally possible?

How does 'AND' distribute over 'OR' (Set Theory)?

How can you evade tax by getting employment income just in equity, then using this equity as collateral to take out loan?

Understanding the point of a kölsche Witz

Acceptable to cut steak before searing?

Why do funding agencies like the NSF not publish accepted grants?

If "more guns less crime", how do gun advocates explain that the EU has less crime than the US?

MinionPro is erroneous



Return list of all values that match Two criteria


Excel: VLOOKUP and INDEX+MATCH return #REFHow can I return a count of a specific criteria in a range of duplicated items?INDEX + MATCH function returning wrong valuesExcel INDEX MATCH Checking Multiple ColumnsExcel - Unique values from Index-Match-Large-If array formulaReturn list of all values that match criteriaExcel Index Match with Two Criteria, where 1 of the 2 criteria is match based on less than or equal toExcel formula to count the number of rows that meets one or more of many criteriaExcel - How to return different match values with other formulas?Excel formula to match multiple criteria






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








2















I am trying to setup a formula that returns values that satisfy two criteria.
E.g.



 A B C
1 Bob Banana 10
2 John Banana 10
3 Steven Apple 5
4 Elliott Apple 2
5 Andrew Apple 5


I want to return a list of names with the values in column B and C that equal Apple and 5, respectively.



I have used a variant of the formula below to successfully return one value but am having trouble getting the second value into this formula



=IFERROR(INDEX($A$1:$A$4,SMALL(IF($B$1:$B$4=$D$1,ROW($B$1:$B$4)-ROW($B$1)+1),ROWS($B$1:$B1))),"")


if someone could help me work that is out that would be awesome. Thanks.










share|improve this question
























  • Have you ruled out just filtering on those two columns? Is D1 where you specify the B value, and the idea would be to specify the C value in another cell? What do you want returned (row numbers, only A values since B & C are specified, all three values)? What form do you need the output in (consolidated list, replicated values or indicator in each qualifying row, highlighting qualifying values)? Is every name unique or can there be duplicates? If the names are unique or you want a list of unique qualifying values, depending on the output requirements a pivot table could work.

    – fixer1234
    Jul 31 at 6:03


















2















I am trying to setup a formula that returns values that satisfy two criteria.
E.g.



 A B C
1 Bob Banana 10
2 John Banana 10
3 Steven Apple 5
4 Elliott Apple 2
5 Andrew Apple 5


I want to return a list of names with the values in column B and C that equal Apple and 5, respectively.



I have used a variant of the formula below to successfully return one value but am having trouble getting the second value into this formula



=IFERROR(INDEX($A$1:$A$4,SMALL(IF($B$1:$B$4=$D$1,ROW($B$1:$B$4)-ROW($B$1)+1),ROWS($B$1:$B1))),"")


if someone could help me work that is out that would be awesome. Thanks.










share|improve this question
























  • Have you ruled out just filtering on those two columns? Is D1 where you specify the B value, and the idea would be to specify the C value in another cell? What do you want returned (row numbers, only A values since B & C are specified, all three values)? What form do you need the output in (consolidated list, replicated values or indicator in each qualifying row, highlighting qualifying values)? Is every name unique or can there be duplicates? If the names are unique or you want a list of unique qualifying values, depending on the output requirements a pivot table could work.

    – fixer1234
    Jul 31 at 6:03














2












2








2








I am trying to setup a formula that returns values that satisfy two criteria.
E.g.



 A B C
1 Bob Banana 10
2 John Banana 10
3 Steven Apple 5
4 Elliott Apple 2
5 Andrew Apple 5


I want to return a list of names with the values in column B and C that equal Apple and 5, respectively.



I have used a variant of the formula below to successfully return one value but am having trouble getting the second value into this formula



=IFERROR(INDEX($A$1:$A$4,SMALL(IF($B$1:$B$4=$D$1,ROW($B$1:$B$4)-ROW($B$1)+1),ROWS($B$1:$B1))),"")


if someone could help me work that is out that would be awesome. Thanks.










share|improve this question














I am trying to setup a formula that returns values that satisfy two criteria.
E.g.



 A B C
1 Bob Banana 10
2 John Banana 10
3 Steven Apple 5
4 Elliott Apple 2
5 Andrew Apple 5


I want to return a list of names with the values in column B and C that equal Apple and 5, respectively.



I have used a variant of the formula below to successfully return one value but am having trouble getting the second value into this formula



=IFERROR(INDEX($A$1:$A$4,SMALL(IF($B$1:$B$4=$D$1,ROW($B$1:$B$4)-ROW($B$1)+1),ROWS($B$1:$B1))),"")


if someone could help me work that is out that would be awesome. Thanks.







microsoft-excel vlookup






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Jul 31 at 5:08









ShaunShaun

132 bronze badges




132 bronze badges















  • Have you ruled out just filtering on those two columns? Is D1 where you specify the B value, and the idea would be to specify the C value in another cell? What do you want returned (row numbers, only A values since B & C are specified, all three values)? What form do you need the output in (consolidated list, replicated values or indicator in each qualifying row, highlighting qualifying values)? Is every name unique or can there be duplicates? If the names are unique or you want a list of unique qualifying values, depending on the output requirements a pivot table could work.

    – fixer1234
    Jul 31 at 6:03


















  • Have you ruled out just filtering on those two columns? Is D1 where you specify the B value, and the idea would be to specify the C value in another cell? What do you want returned (row numbers, only A values since B & C are specified, all three values)? What form do you need the output in (consolidated list, replicated values or indicator in each qualifying row, highlighting qualifying values)? Is every name unique or can there be duplicates? If the names are unique or you want a list of unique qualifying values, depending on the output requirements a pivot table could work.

    – fixer1234
    Jul 31 at 6:03

















Have you ruled out just filtering on those two columns? Is D1 where you specify the B value, and the idea would be to specify the C value in another cell? What do you want returned (row numbers, only A values since B & C are specified, all three values)? What form do you need the output in (consolidated list, replicated values or indicator in each qualifying row, highlighting qualifying values)? Is every name unique or can there be duplicates? If the names are unique or you want a list of unique qualifying values, depending on the output requirements a pivot table could work.

– fixer1234
Jul 31 at 6:03






Have you ruled out just filtering on those two columns? Is D1 where you specify the B value, and the idea would be to specify the C value in another cell? What do you want returned (row numbers, only A values since B & C are specified, all three values)? What form do you need the output in (consolidated list, replicated values or indicator in each qualifying row, highlighting qualifying values)? Is every name unique or can there be duplicates? If the names are unique or you want a list of unique qualifying values, depending on the output requirements a pivot table could work.

– fixer1234
Jul 31 at 6:03











2 Answers
2






active

oldest

votes


















4














This Array formula can solve the issue:



enter image description here



=IFERROR(INDEX($J$38:$L$42, SMALL(IF(COUNTIFS($J$44, $K$38:$K$42, $K$44, $L$38:$L$42), ROW($J$38:$L$42)-MIN(ROW($J$38:$L$42))+1), ROW(A1)), COLUMN(A1)),"")


N.B.



  • Finish formula in Cell J46, with Ctrl+Shift+Enter, fill Right then Down.

  • Cell J44 & K44 comprises criteria


  • Your Formula search values only in one Column,,
    =IFERROR(INDEX($A$1:$A$4

  • Also it matches only one criteria instead of two,

IF($B$1:$B$4=$D$1




Now, let me describe the mechanism behind the Array formula:



 =INDEX($J$38:$L$42, SMALL(False, False, 3, False, 5, ROW(A1)), COLUMN(A1)) 


becomes,



=INDEX($J$38:$L$42, 3, 5)



Returns Names then by dragging Right & Down the others values.



(IF(COUNTIFS($J$44, $K$38:$K$42, $K$44, $L$38:$L$42), ROW($J$38:$L$42)-MIN(ROW($J$38:$L$42))+1)


Returns,



IF(0, 0, 1, 0, 1,, 1, 2, 3, 4, 5)



And finally the combination of TRUE/FALSE & row number 3 & 5 like this,



False,False, 3, False, 5 get combined with INDEX & SMALL, shown above also.



  • Formula is wrapped with IFERROR to replace error with blanks, if formula doesn't finds the value.

Adjust cell references in Formula as needed.






share|improve this answer



























  • You can wrap a formula in AGGREGATE without the IF statement to avoid the array entering, otherwise, good explaination.

    – JvdV
    Jul 31 at 7:04











  • @JvdV,, thanks for the feedback,, yes AGGREGATE can fix it also but this method is comparatively easier !!

    – Rajesh S
    Jul 31 at 7:06











  • @fixer1234,, yeah I found typo while reading ,,☺

    – Rajesh S
    Jul 31 at 7:08











  • Thanks Rajesh. How would I go about it when I want to output the matches on a separate sheet?

    – Shaun
    Aug 1 at 5:28











  • disregard my last question. I worked it out. Cheers.

    – Shaun
    Aug 1 at 5:38


















3














Rajesh S ran with the approach you attempted and demonstrated how to make that work. If the data is dynamic, that has you covered. But if you only need to periodically extract a results table, I'll toss in a couple of really simple alternatives. These can be done in minutes, even if you're out of coffee for your brain.



Filtering



In the image below, I deselected the filters after copying the results so you could see the source data.



enter image description here



  • Highlight the data you want to use for criteria.

  • Turn on filtering.

  • Select the values you want in the filters. This will hide everything you don't want.

  • Select what's displayed, copy it, paste it to your results area.

Need different criteria? Select the new criteria. Copy and paste.



Pivot Table



For a given set of criteria, every qualifying record will have a name and then repeat the criteria on each record. If you are generating reports for different criteria, you will want to keep the criteria with the result. But if you don't need it on every record, a pivot table offers a fast way to do it.



enter image description here



  • Highlight the data.

  • From the toolbar or menu, Insert Pivot Table.

  • Drag the Name field to the Rows window. Drag the Fruit and Number fields to the filters.

  • Select your criteria in the filters.

The result is the list of qualifying names, with the criteria summarized in the heading.



You can copy the pivot table and have two pasting choices. A normal paste will give you another pivot table. You can change the filter criteria in it for another case. Paste Special, Values will paste a copy of the results.






share|improve this answer



























  • Really both are good solution, if one don't like using Function/Formula ☺

    – Rajesh S
    Jul 31 at 8:25














Your Answer








StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "3"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













draft saved

draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1466001%2freturn-list-of-all-values-that-match-two-criteria%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown

























2 Answers
2






active

oldest

votes








2 Answers
2






active

oldest

votes









active

oldest

votes






active

oldest

votes









4














This Array formula can solve the issue:



enter image description here



=IFERROR(INDEX($J$38:$L$42, SMALL(IF(COUNTIFS($J$44, $K$38:$K$42, $K$44, $L$38:$L$42), ROW($J$38:$L$42)-MIN(ROW($J$38:$L$42))+1), ROW(A1)), COLUMN(A1)),"")


N.B.



  • Finish formula in Cell J46, with Ctrl+Shift+Enter, fill Right then Down.

  • Cell J44 & K44 comprises criteria


  • Your Formula search values only in one Column,,
    =IFERROR(INDEX($A$1:$A$4

  • Also it matches only one criteria instead of two,

IF($B$1:$B$4=$D$1




Now, let me describe the mechanism behind the Array formula:



 =INDEX($J$38:$L$42, SMALL(False, False, 3, False, 5, ROW(A1)), COLUMN(A1)) 


becomes,



=INDEX($J$38:$L$42, 3, 5)



Returns Names then by dragging Right & Down the others values.



(IF(COUNTIFS($J$44, $K$38:$K$42, $K$44, $L$38:$L$42), ROW($J$38:$L$42)-MIN(ROW($J$38:$L$42))+1)


Returns,



IF(0, 0, 1, 0, 1,, 1, 2, 3, 4, 5)



And finally the combination of TRUE/FALSE & row number 3 & 5 like this,



False,False, 3, False, 5 get combined with INDEX & SMALL, shown above also.



  • Formula is wrapped with IFERROR to replace error with blanks, if formula doesn't finds the value.

Adjust cell references in Formula as needed.






share|improve this answer



























  • You can wrap a formula in AGGREGATE without the IF statement to avoid the array entering, otherwise, good explaination.

    – JvdV
    Jul 31 at 7:04











  • @JvdV,, thanks for the feedback,, yes AGGREGATE can fix it also but this method is comparatively easier !!

    – Rajesh S
    Jul 31 at 7:06











  • @fixer1234,, yeah I found typo while reading ,,☺

    – Rajesh S
    Jul 31 at 7:08











  • Thanks Rajesh. How would I go about it when I want to output the matches on a separate sheet?

    – Shaun
    Aug 1 at 5:28











  • disregard my last question. I worked it out. Cheers.

    – Shaun
    Aug 1 at 5:38















4














This Array formula can solve the issue:



enter image description here



=IFERROR(INDEX($J$38:$L$42, SMALL(IF(COUNTIFS($J$44, $K$38:$K$42, $K$44, $L$38:$L$42), ROW($J$38:$L$42)-MIN(ROW($J$38:$L$42))+1), ROW(A1)), COLUMN(A1)),"")


N.B.



  • Finish formula in Cell J46, with Ctrl+Shift+Enter, fill Right then Down.

  • Cell J44 & K44 comprises criteria


  • Your Formula search values only in one Column,,
    =IFERROR(INDEX($A$1:$A$4

  • Also it matches only one criteria instead of two,

IF($B$1:$B$4=$D$1




Now, let me describe the mechanism behind the Array formula:



 =INDEX($J$38:$L$42, SMALL(False, False, 3, False, 5, ROW(A1)), COLUMN(A1)) 


becomes,



=INDEX($J$38:$L$42, 3, 5)



Returns Names then by dragging Right & Down the others values.



(IF(COUNTIFS($J$44, $K$38:$K$42, $K$44, $L$38:$L$42), ROW($J$38:$L$42)-MIN(ROW($J$38:$L$42))+1)


Returns,



IF(0, 0, 1, 0, 1,, 1, 2, 3, 4, 5)



And finally the combination of TRUE/FALSE & row number 3 & 5 like this,



False,False, 3, False, 5 get combined with INDEX & SMALL, shown above also.



  • Formula is wrapped with IFERROR to replace error with blanks, if formula doesn't finds the value.

Adjust cell references in Formula as needed.






share|improve this answer



























  • You can wrap a formula in AGGREGATE without the IF statement to avoid the array entering, otherwise, good explaination.

    – JvdV
    Jul 31 at 7:04











  • @JvdV,, thanks for the feedback,, yes AGGREGATE can fix it also but this method is comparatively easier !!

    – Rajesh S
    Jul 31 at 7:06











  • @fixer1234,, yeah I found typo while reading ,,☺

    – Rajesh S
    Jul 31 at 7:08











  • Thanks Rajesh. How would I go about it when I want to output the matches on a separate sheet?

    – Shaun
    Aug 1 at 5:28











  • disregard my last question. I worked it out. Cheers.

    – Shaun
    Aug 1 at 5:38













4












4








4







This Array formula can solve the issue:



enter image description here



=IFERROR(INDEX($J$38:$L$42, SMALL(IF(COUNTIFS($J$44, $K$38:$K$42, $K$44, $L$38:$L$42), ROW($J$38:$L$42)-MIN(ROW($J$38:$L$42))+1), ROW(A1)), COLUMN(A1)),"")


N.B.



  • Finish formula in Cell J46, with Ctrl+Shift+Enter, fill Right then Down.

  • Cell J44 & K44 comprises criteria


  • Your Formula search values only in one Column,,
    =IFERROR(INDEX($A$1:$A$4

  • Also it matches only one criteria instead of two,

IF($B$1:$B$4=$D$1




Now, let me describe the mechanism behind the Array formula:



 =INDEX($J$38:$L$42, SMALL(False, False, 3, False, 5, ROW(A1)), COLUMN(A1)) 


becomes,



=INDEX($J$38:$L$42, 3, 5)



Returns Names then by dragging Right & Down the others values.



(IF(COUNTIFS($J$44, $K$38:$K$42, $K$44, $L$38:$L$42), ROW($J$38:$L$42)-MIN(ROW($J$38:$L$42))+1)


Returns,



IF(0, 0, 1, 0, 1,, 1, 2, 3, 4, 5)



And finally the combination of TRUE/FALSE & row number 3 & 5 like this,



False,False, 3, False, 5 get combined with INDEX & SMALL, shown above also.



  • Formula is wrapped with IFERROR to replace error with blanks, if formula doesn't finds the value.

Adjust cell references in Formula as needed.






share|improve this answer















This Array formula can solve the issue:



enter image description here



=IFERROR(INDEX($J$38:$L$42, SMALL(IF(COUNTIFS($J$44, $K$38:$K$42, $K$44, $L$38:$L$42), ROW($J$38:$L$42)-MIN(ROW($J$38:$L$42))+1), ROW(A1)), COLUMN(A1)),"")


N.B.



  • Finish formula in Cell J46, with Ctrl+Shift+Enter, fill Right then Down.

  • Cell J44 & K44 comprises criteria


  • Your Formula search values only in one Column,,
    =IFERROR(INDEX($A$1:$A$4

  • Also it matches only one criteria instead of two,

IF($B$1:$B$4=$D$1




Now, let me describe the mechanism behind the Array formula:



 =INDEX($J$38:$L$42, SMALL(False, False, 3, False, 5, ROW(A1)), COLUMN(A1)) 


becomes,



=INDEX($J$38:$L$42, 3, 5)



Returns Names then by dragging Right & Down the others values.



(IF(COUNTIFS($J$44, $K$38:$K$42, $K$44, $L$38:$L$42), ROW($J$38:$L$42)-MIN(ROW($J$38:$L$42))+1)


Returns,



IF(0, 0, 1, 0, 1,, 1, 2, 3, 4, 5)



And finally the combination of TRUE/FALSE & row number 3 & 5 like this,



False,False, 3, False, 5 get combined with INDEX & SMALL, shown above also.



  • Formula is wrapped with IFERROR to replace error with blanks, if formula doesn't finds the value.

Adjust cell references in Formula as needed.







share|improve this answer














share|improve this answer



share|improve this answer








edited Jul 31 at 7:01

























answered Jul 31 at 6:42









Rajesh SRajesh S

5,4523 gold badges8 silver badges27 bronze badges




5,4523 gold badges8 silver badges27 bronze badges















  • You can wrap a formula in AGGREGATE without the IF statement to avoid the array entering, otherwise, good explaination.

    – JvdV
    Jul 31 at 7:04











  • @JvdV,, thanks for the feedback,, yes AGGREGATE can fix it also but this method is comparatively easier !!

    – Rajesh S
    Jul 31 at 7:06











  • @fixer1234,, yeah I found typo while reading ,,☺

    – Rajesh S
    Jul 31 at 7:08











  • Thanks Rajesh. How would I go about it when I want to output the matches on a separate sheet?

    – Shaun
    Aug 1 at 5:28











  • disregard my last question. I worked it out. Cheers.

    – Shaun
    Aug 1 at 5:38

















  • You can wrap a formula in AGGREGATE without the IF statement to avoid the array entering, otherwise, good explaination.

    – JvdV
    Jul 31 at 7:04











  • @JvdV,, thanks for the feedback,, yes AGGREGATE can fix it also but this method is comparatively easier !!

    – Rajesh S
    Jul 31 at 7:06











  • @fixer1234,, yeah I found typo while reading ,,☺

    – Rajesh S
    Jul 31 at 7:08











  • Thanks Rajesh. How would I go about it when I want to output the matches on a separate sheet?

    – Shaun
    Aug 1 at 5:28











  • disregard my last question. I worked it out. Cheers.

    – Shaun
    Aug 1 at 5:38
















You can wrap a formula in AGGREGATE without the IF statement to avoid the array entering, otherwise, good explaination.

– JvdV
Jul 31 at 7:04





You can wrap a formula in AGGREGATE without the IF statement to avoid the array entering, otherwise, good explaination.

– JvdV
Jul 31 at 7:04













@JvdV,, thanks for the feedback,, yes AGGREGATE can fix it also but this method is comparatively easier !!

– Rajesh S
Jul 31 at 7:06





@JvdV,, thanks for the feedback,, yes AGGREGATE can fix it also but this method is comparatively easier !!

– Rajesh S
Jul 31 at 7:06













@fixer1234,, yeah I found typo while reading ,,☺

– Rajesh S
Jul 31 at 7:08





@fixer1234,, yeah I found typo while reading ,,☺

– Rajesh S
Jul 31 at 7:08













Thanks Rajesh. How would I go about it when I want to output the matches on a separate sheet?

– Shaun
Aug 1 at 5:28





Thanks Rajesh. How would I go about it when I want to output the matches on a separate sheet?

– Shaun
Aug 1 at 5:28













disregard my last question. I worked it out. Cheers.

– Shaun
Aug 1 at 5:38





disregard my last question. I worked it out. Cheers.

– Shaun
Aug 1 at 5:38













3














Rajesh S ran with the approach you attempted and demonstrated how to make that work. If the data is dynamic, that has you covered. But if you only need to periodically extract a results table, I'll toss in a couple of really simple alternatives. These can be done in minutes, even if you're out of coffee for your brain.



Filtering



In the image below, I deselected the filters after copying the results so you could see the source data.



enter image description here



  • Highlight the data you want to use for criteria.

  • Turn on filtering.

  • Select the values you want in the filters. This will hide everything you don't want.

  • Select what's displayed, copy it, paste it to your results area.

Need different criteria? Select the new criteria. Copy and paste.



Pivot Table



For a given set of criteria, every qualifying record will have a name and then repeat the criteria on each record. If you are generating reports for different criteria, you will want to keep the criteria with the result. But if you don't need it on every record, a pivot table offers a fast way to do it.



enter image description here



  • Highlight the data.

  • From the toolbar or menu, Insert Pivot Table.

  • Drag the Name field to the Rows window. Drag the Fruit and Number fields to the filters.

  • Select your criteria in the filters.

The result is the list of qualifying names, with the criteria summarized in the heading.



You can copy the pivot table and have two pasting choices. A normal paste will give you another pivot table. You can change the filter criteria in it for another case. Paste Special, Values will paste a copy of the results.






share|improve this answer



























  • Really both are good solution, if one don't like using Function/Formula ☺

    – Rajesh S
    Jul 31 at 8:25
















3














Rajesh S ran with the approach you attempted and demonstrated how to make that work. If the data is dynamic, that has you covered. But if you only need to periodically extract a results table, I'll toss in a couple of really simple alternatives. These can be done in minutes, even if you're out of coffee for your brain.



Filtering



In the image below, I deselected the filters after copying the results so you could see the source data.



enter image description here



  • Highlight the data you want to use for criteria.

  • Turn on filtering.

  • Select the values you want in the filters. This will hide everything you don't want.

  • Select what's displayed, copy it, paste it to your results area.

Need different criteria? Select the new criteria. Copy and paste.



Pivot Table



For a given set of criteria, every qualifying record will have a name and then repeat the criteria on each record. If you are generating reports for different criteria, you will want to keep the criteria with the result. But if you don't need it on every record, a pivot table offers a fast way to do it.



enter image description here



  • Highlight the data.

  • From the toolbar or menu, Insert Pivot Table.

  • Drag the Name field to the Rows window. Drag the Fruit and Number fields to the filters.

  • Select your criteria in the filters.

The result is the list of qualifying names, with the criteria summarized in the heading.



You can copy the pivot table and have two pasting choices. A normal paste will give you another pivot table. You can change the filter criteria in it for another case. Paste Special, Values will paste a copy of the results.






share|improve this answer



























  • Really both are good solution, if one don't like using Function/Formula ☺

    – Rajesh S
    Jul 31 at 8:25














3












3








3







Rajesh S ran with the approach you attempted and demonstrated how to make that work. If the data is dynamic, that has you covered. But if you only need to periodically extract a results table, I'll toss in a couple of really simple alternatives. These can be done in minutes, even if you're out of coffee for your brain.



Filtering



In the image below, I deselected the filters after copying the results so you could see the source data.



enter image description here



  • Highlight the data you want to use for criteria.

  • Turn on filtering.

  • Select the values you want in the filters. This will hide everything you don't want.

  • Select what's displayed, copy it, paste it to your results area.

Need different criteria? Select the new criteria. Copy and paste.



Pivot Table



For a given set of criteria, every qualifying record will have a name and then repeat the criteria on each record. If you are generating reports for different criteria, you will want to keep the criteria with the result. But if you don't need it on every record, a pivot table offers a fast way to do it.



enter image description here



  • Highlight the data.

  • From the toolbar or menu, Insert Pivot Table.

  • Drag the Name field to the Rows window. Drag the Fruit and Number fields to the filters.

  • Select your criteria in the filters.

The result is the list of qualifying names, with the criteria summarized in the heading.



You can copy the pivot table and have two pasting choices. A normal paste will give you another pivot table. You can change the filter criteria in it for another case. Paste Special, Values will paste a copy of the results.






share|improve this answer















Rajesh S ran with the approach you attempted and demonstrated how to make that work. If the data is dynamic, that has you covered. But if you only need to periodically extract a results table, I'll toss in a couple of really simple alternatives. These can be done in minutes, even if you're out of coffee for your brain.



Filtering



In the image below, I deselected the filters after copying the results so you could see the source data.



enter image description here



  • Highlight the data you want to use for criteria.

  • Turn on filtering.

  • Select the values you want in the filters. This will hide everything you don't want.

  • Select what's displayed, copy it, paste it to your results area.

Need different criteria? Select the new criteria. Copy and paste.



Pivot Table



For a given set of criteria, every qualifying record will have a name and then repeat the criteria on each record. If you are generating reports for different criteria, you will want to keep the criteria with the result. But if you don't need it on every record, a pivot table offers a fast way to do it.



enter image description here



  • Highlight the data.

  • From the toolbar or menu, Insert Pivot Table.

  • Drag the Name field to the Rows window. Drag the Fruit and Number fields to the filters.

  • Select your criteria in the filters.

The result is the list of qualifying names, with the criteria summarized in the heading.



You can copy the pivot table and have two pasting choices. A normal paste will give you another pivot table. You can change the filter criteria in it for another case. Paste Special, Values will paste a copy of the results.







share|improve this answer














share|improve this answer



share|improve this answer








edited Jul 31 at 8:11

























answered Jul 31 at 8:04









fixer1234fixer1234

21.8k14 gold badges53 silver badges89 bronze badges




21.8k14 gold badges53 silver badges89 bronze badges















  • Really both are good solution, if one don't like using Function/Formula ☺

    – Rajesh S
    Jul 31 at 8:25


















  • Really both are good solution, if one don't like using Function/Formula ☺

    – Rajesh S
    Jul 31 at 8:25

















Really both are good solution, if one don't like using Function/Formula ☺

– Rajesh S
Jul 31 at 8:25






Really both are good solution, if one don't like using Function/Formula ☺

– Rajesh S
Jul 31 at 8:25


















draft saved

draft discarded
















































Thanks for contributing an answer to Super User!


  • Please be sure to answer the question. Provide details and share your research!

But avoid


  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1466001%2freturn-list-of-all-values-that-match-two-criteria%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Get product attribute by attribute group code in magento 2get product attribute by product attribute group in magento 2Magento 2 Log Bundle Product Data in List Page?How to get all product attribute of a attribute group of Default attribute set?Magento 2.1 Create a filter in the product grid by new attributeMagento 2 : Get Product Attribute values By GroupMagento 2 How to get all existing values for one attributeMagento 2 get custom attribute of a single product inside a pluginMagento 2.3 How to get all the Multi Source Inventory (MSI) locations collection in custom module?Magento2: how to develop rest API to get new productsGet product attribute by attribute group code ( [attribute_group_code] ) in magento 2

Category:9 (number) SubcategoriesMedia in category "9 (number)"Navigation menuUpload mediaGND ID: 4485639-8Library of Congress authority ID: sh85091979ReasonatorScholiaStatistics

Magento 2.3: How do i solve this, Not registered handle, on custom form?How can i rewrite TierPrice Block in Magento2magento 2 captcha not rendering if I override layout xmlmain.CRITICAL: Plugin class doesn't existMagento 2 : Problem while adding custom button order view page?Magento 2.2.5: Overriding Admin Controller sales/orderMagento 2.2.5: Add, Update and Delete existing products Custom OptionsMagento 2.3 : File Upload issue in UI Component FormMagento2 Not registered handleHow to configured Form Builder Js in my custom magento 2.3.0 module?Magento 2.3. How to create image upload field in an admin form