Returning multiple values from multiple criteria

CheekyDevil

New Member
Joined
Apr 15, 2018
Messages
20
Hey all,

I'm in desperate need for a code that will allow the return of multiple values from a line of cells (of which I can then CONCATENATE) using a given criteria.

For context, my headings are:

A1 = Date B1 = Agent C1 = TL D1 = Type E1 = Ref# F1 = Comments

What I need is a code that allows me to enter a TL name in a cell (say L1 to keep it out of the way), and return all the agents and corresponding data from A to F that have this TL in the data range (A1:F5000)

Then (if possible) if I can further narrow it down to return the result of all items from a particular agent (name entered in K1), for example, all data from Dave (agent) in Allen's team (TL).

I've tried using an INDEX + MATCH combination but as it turns out I'm not at this level to understand this formula just yet HAHA

Thank you for any help you can provide :)
 

Excel Facts

Links? Where??
If Excel says you have links but you can't find them, go to Formulas, Name Manager. Look for old links to dead workbooks & delete.
Sure thing, I tried to do this using a table on the initial post but I failed.... miserably :)

I really hope this helps (I've used an excel sheet but not sure on the pasted format)

A1B1
C1D1E1F1
K1L1
DATEAGENT
TLTYPEREFNOTES
LoganNiel
8/02/2018Logan
Niel Coaching2131data about logan 1
13/02/2018Paige
Craig Feedback5215641651data about paige **DESIRED RESULT**
15/02/2018Vicky
Toddy Coaching157891data about vicky Agent Name
16/02/2018Jordan
Dylan Live Escalation15156data about jordan
Ref#TypeNotes
16/02/2018Amy
Niel Feedback47851data about amy 2131
Coachingdata about logan 1
20/02/2018Ali
Toddy Feedback1789465data about ali 364872334Call Review
data about logan 2
21/02/2018Debi
Niel Feedback4178451data about debi
27/02/2018Logan
Niel Call Review364872334data about logan 2

<colgroup><col><col><col><col><col><col><col><col><col><col><col></colgroup><tbody>
</tbody>


So from A1 to F5000 is going to be data entries from a user form (simply mentioned as this is going to be my 'data pool'). What I am developing is a tool for the agents Team Leaders to pull the data from this pool to narrow down the results to only their agents, and then further still to an individual agent.

In summary, if only the TL name is populated, show all data within the range A1 to F5000 (or greater) with all the agents in their team, and if an individual name is selected, narrow these down to only the data from this agent.

In all entries, the TL of the agent is going to be in the adjacent cell next to the agent name (I,e Agent is in A1, their TL will be in B1)

Again I really hope this clarifies my situation as I'm not the best at explaining myself :)

Thank you for your time and potential assistance :)
 
Upvote 0
Thanks for the sample and expected results...

Row\Col
A​
B​
C​
D​
E​
F​
K​
L​
M​
1​
DATEAGENTTLTYPEREFNOTESLoganNiel
2​
8/2/2018​
LoganNielCoaching
2131​
data about logan 1
3​
13/02/2018​
PaigeCraigFeedback
5215641651​
data about paige**DESIRED RESULT**
4​
15/02/2018​
VickyToddyCoaching
157891​
data about vickyAgent Name
5​
16/02/2018​
JordanDylanLive Escalation
15156​
data about jordanRefTypeNotes
6​
16/02/2018​
AmyNielFeedback
47851​
data about amy
2131​
Coachingdata about logan 1
7​
20/02/2018​
AliToddyFeedback
1789465​
data about ali
364872334​
Call Reviewdata about logan 2
8​
21/02/2018​
DebiNielFeedback
4178451​
data about debi
9​
27/02/2018​
LoganNielCall Review
364872334​
data about logan 2

In K6 control+shift+enter, not just enter, copy across, and down:

=IFERROR(INDEX($A$2:$F$9,SMALL(IF($B$2:$B$9=$K$1,IF($C$2:$C$9=IF($L$1="","?*",$L$1),ROW($A$2:$F$9)-ROW($A$2)+1)),ROWS($K$6:K6)),MATCH(K$5,$A$1:$F$1,0)),"")
 
Upvote 0
Thank you very much for the help there Aladin. I sincerely appreciate it, however I regret to advise it has not yet performed as intended. I can play around with the code and see if I can get it to work as I think it may need to have the references expanded (from F9 to F-ongoing lol) but I think I can work with it as it is :)

Again I really thank you for taking time to do that for me :) It's been a real head-scratcher for a while now :):)
 
Upvote 0
Thank you very much for the help there Aladin. I sincerely appreciate it, however I regret to advise it has not yet performed as intended. I can play around with the code and see if I can get it to work as I think it may need to have the references expanded (from F9 to F-ongoing lol) but I think I can work with it as it is :)

Again I really thank you for taking time to do that for me :) It's been a real head-scratcher for a while now :):)

Hi!

Try this small modification in Aladin's formula:

=IFERROR(INDEX($A$2:$F$9,SMALL(IF($C$2:$C$9=$L$1,IF($B$2:$B$9=IF($K$1="",$B$2:$B$9,$K$1),ROW($A$2:$F$9)-ROW($A$2)+1)),ROWS($K$6:K6)),MATCH(K$5,$A$1:$F$1,0)),"")

Markmzz
 
Upvote 0
Thank you very much for the help there Aladin. I sincerely appreciate it, however I regret to advise it has not yet performed as intended. I can play around with the code and see if I can get it to work as I think it may need to have the references expanded (from F9 to F-ongoing lol) but I think I can work with it as it is :)

Again I really thank you for taking time to do that for me :) It's been a real head-scratcher for a while now :):)

What did I miss if I'm understanding your comment correctly?
 
Upvote 0
Hey thank you both very much for helping here!

Not too sure why, but I copy and paste the code to K6 (ensuring I CTRL + SHIFT + ENTER also to make it an array formula) and dragged it down, however it returns blank results, even when I copy and paste the names in the references to ensure accuracy.

I do have a sample sheet I can send but cannot work out how to upload it to this thread... (I'm awaiting the "NEWBIE" remarks hehe)

I suppose the easiest way of explaining this is I need it to "auto filter" the invalid results from A2 to F~ (as this will be an ever expanding data set) and only show the corresponding agents data in the row.
 
Upvote 0
Hey thank you both very much for helping here!

Not too sure why, but I copy and paste the code to K6 (ensuring I CTRL + SHIFT + ENTER also to make it an array formula) and dragged it down, however it returns blank results, even when I copy and paste the names in the references to ensure accuracy.

I do have a sample sheet I can send but cannot work out how to upload it to this thread... (I'm awaiting the "NEWBIE" remarks hehe)

I suppose the easiest way of explaining this is I need it to "auto filter" the invalid results from A2 to F~ (as this will be an ever expanding data set) and only show the corresponding agents data in the row.

Both?

Here is the workbook which implements the set up I described: https://www.dropbox.com/s/mf3owhflrpg171j/CheekyDevil%20Returning%20multiple%20values%20from%20multiple%20criteria.xlsx?dl=0

Hope this helps.

P.S. Note that the set up expects an agent in K1 while L1 can be empty if so desired.
 
Last edited:
Upvote 0
Thanks Aladin, yes both you and markmmz :)

That has worked perfectly! Downloading your workbook has allowed me to see the code working, and then updating it to Marks amendment has done exactly what I wanted it to do :)

Once again I really cannot thank you enough for all your assistance. I'm expected to have this report functional by the end of the week and could not have met this without your help. You guys are simply amazing and thank you for being so patient with me!
 
Upvote 0

Forum statistics

Threads
1,214,951
Messages
6,122,442
Members
449,083
Latest member
Ava19

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