Return Multiple Rows of Data without Arrays

Tarver

Board Regular
Joined
Nov 15, 2012
Messages
113
Office Version
  1. 365
Platform
  1. Windows
  2. MacOS
I've got a large table of values, 5000+ rows long, and about 20 columns wide.

In that table are multiple items with the same partner name. I need to pull all of the entries out of that table for a specific partner. There may be anywhere from 1 to 20 occurrences of that partner name in the table.

I'm trying to do this WITHOUT array formulas. (Because of the large amount of memory used by arrays, Excel keeps crashing on me.) My data looks like this:

[TABLE="class: grid, width: 600"]
<tbody>[TR]
[TD][/TD]
[TD]A[/TD]
[TD]B[/TD]
[TD]C[/TD]
[TD]D[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]Partner[/TD]
[TD]Promo[/TD]
[TD]Start Date[/TD]
[TD]End Date[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]Subway[/TD]
[TD]$5 Footlong[/TD]
[TD]01/01/2019[/TD]
[TD]01/31/2019[/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]Long John Silvers[/TD]
[TD]Save $2[/TD]
[TD]01/15/2019[/TD]
[TD]01/30/2019[/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD]Subway[/TD]
[TD]Free Cookie[/TD]
[TD]02/02/2019[/TD]
[TD]02/13/2019[/TD]
[/TR]
[TR]
[TD]5[/TD]
[TD]Coca Cola[/TD]
[TD]Buy one get one[/TD]
[TD]02/02/2019[/TD]
[TD]03/15/2019[/TD]
[/TR]
[TR]
[TD]6[/TD]
[TD]Coca Cola[/TD]
[TD]Awareness[/TD]
[TD]02/02/2019[/TD]
[TD]03/01/2019[/TD]
[/TR]
[TR]
[TD]7[/TD]
[TD]Subway[/TD]
[TD]Chips and a Drink[/TD]
[TD]03/15/2019[/TD]
[TD]03/27/2019[/TD]
[/TR]
</tbody>[/TABLE]

On another tab, in cell AK10, I need to be able to select Subway from my list of partners and get the three matches for Subway in the above table in rows 2, 4, and 7 to show starting in cells AK11, AK12, and AK13. Or I need to be able to select Long John Silvers and get the one result that's here in row 3 displayed in cell AK11.

I hope I'm explaining that clearly.

With arrays, this should be a fairly easy task. However, is there a sensible way to do this using only formulas, no arrays?

Thanks in advance for your ideas!
 
Last edited:

Excel Facts

Create a Pivot Table on a Map
If your data has zip codes, postal codes, or city names, select the data and use Insert, 3D Map. (Found to right of chart icons).
Akuini, yes, I'm okay to use VBA. My problem is that I'm not a VBA expert. I can record a macro and edit a little, but not much beyond that.
 
Upvote 0
https://www.mrexcel.com/forum/redir...13/parameters-in-excel-external-data-queries/
Don't know if it suits your situation: there is a simple (when familar) way without formulas - a parameterised query.

Suggest you google. Such as http://dailydoseofexcel.com/archives...-data-queries/
https://www.mrexcel.com/forum/redir...13/parameters-in-excel-external-data-queries/

Wow!

This was NOT easy to do. I ended up having to edit the query in SQL to get my parameters to work, however, this was a BRILLIANT SOLUTION to the problem, and I'm very grateful for your help!
 
Upvote 0

Forum statistics

Threads
1,224,819
Messages
6,181,153
Members
453,021
Latest member
Justyna P

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