how to bring in all the matching rows from a different sheet?

bigdan

Well-known Member
Joined
Oct 5, 2009
Messages
840
Office Version
  1. 2013
Platform
  1. Windows
EDIT - I can't use VBA at work so I'd appreciate a non-VBA option please :)


I have two workbooks that I need to play with.

Both have an Opportunity ID field. I'm using the first one for most of my work, but the second one has a Products field that I need. Each Opp ID is associated with one or more Products.

How do I bring in the various Products associated with an Opp ID?


Here's the second spreadsheet:

A1Computer
A2Phone
A2Keyboard
A2Cup
A3Headphones
A3Laptop

<tbody>
</tbody>


So in the first spreadsheet, when I start with one row for A2, and I don't know how many associated rows there are in the second one, how would I approach this?
 
Last edited:

Excel Facts

Excel Can Read to You
Customize Quick Access Toolbar. From All Commands, add Speak Cells or Speak Cells on Enter to QAT. Select cells. Press Speak Cells.
This is what the first spreadsheet would have

A1irrelevant data
A2irrelevant data
A3irrelevant data

<tbody>
</tbody>

I have to create a third spreadsheet, mainly with information copy/pasted from the first one, but then have to break it up by product, which I would extract from the second one. It could've been as easy as a vlookup if each Opp ID had a single product but unfortunately that's not the case. And we also don't know how many products are associated with each Opp ID, though I believe it's always between 1 and 6.
 
Upvote 0
So where would Phone keyboard and cup go against A2 in your first spreadsheet, ie what are you expecting the output to look like?
 
Upvote 0
In the third spreadsheet phone and keyboard and cup would all be alongside A2. So there would have to be 3 separate rows for A2. Which is the problem, I wouldn't know how many rows to create for each Opp ID. I suppose I could create 6 rows for each Opp ID and then delete the unused ones.
 
Upvote 0

Forum statistics

Threads
1,214,834
Messages
6,121,874
Members
449,056
Latest member
ruhulaminappu

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