Vlookup or Index , Match to display multiple Rows of data

acidburn786

New Member
Joined
Aug 15, 2008
Messages
48
I am Trying to Report on some information based on 2 selections.

Selection 1 = Company
Selection 2 = Process

Each process consist of a number of Activities (1 up to 25) Rows


Data is in sheet1

Lookup in sheet2

So when I select, the Company and a process
Activities should be displayed under each other.
The time it takes for each activity will depend on which Company I selected

Sheet1

*ABCDE
1sheet1****
2ProcessSLACompany ACompany BCompany C
3Process 1Activity 125*25
4Process 1Activity 2Nonen/aN/a
5Process 1Activity 3Prior to payment of commission*Prior to payment of Commission
6Process 1Activity 4N/an/aN/a
7Process 1Activity 5N/a*N/a
8Process 2Activity 1N/a*5
9Process 2Activity 2N/a5N/a
10Process 3Activity 135**
11Process 4Activity 145*3
12Process 4Activity 2*53
13Process 4Activity 3***
14*****
15*****
16sheet2****
17*****
18Process selected:Process 1Company selected:Company A*
19*****
20ActivitiesPeriod***
21Activity 125***
22Activity 2None***
23Activity 3Prior to payment of commission***
24Activity 4N/a***
25Activity 5N/a***
26*****

<colgroup><col style="font-weight:bold; width:30px; "><col style="width:128px;"><col style="width:204px;"><col style="width:194px;"><col style="width:133px;"><col style="width:202px;"></colgroup><tbody>
</tbody>


Excel tables to the web >> Excel Jeanie HTML 4

So in the Example above. A21:B25 should be formulae that pul data in
 
Last edited:

Excel Facts

Who is Mr Spreadsheet?
Author John Walkenbach was Mr Spreadsheet until his retirement in June 2019.
In B21
Code:
=IFERROR(INDEX($C$2:$E$12,MATCH($B$18&A21,$A$2:$A$13&$B$2:$B$13,0),MATCH($D$18,$C$2:$E$2,0)),"")
Entered with CTRL+SHIFT+ENTER
This formula will leave the activities that are not included in a process (like activities 3-5 for process 2) blank
 
Upvote 0
In B21
Code:
=IFERROR(INDEX($C$2:$E$12,MATCH($B$18&A21,$A$2:$A$13&$B$2:$B$13,0),MATCH($D$18,$C$2:$E$2,0)),"")
Entered with CTRL+SHIFT+ENTER
This formula will leave the activities that are not included in a process (like activities 3-5 for process 2) blank


This works to pull the data in thanks, However I need to pull in the Activities also based on the Process (B18)

In other words I do not want to pre-populate A21 - A25, as there may be a list of 25 Activities. This should also be a formula which is based on the process selected (B18) & company selected (D18)

Thanks so far.
 
Upvote 0
Ok, try this in A21, again entered with CTRL+SHIFT+ENTER and drag down
Code:
=IFERROR(INDEX($B$3:$B$13,MATCH(0,SI($B$18=$A$3:$A$13,COUNTIF($A$20:$A20,$B$3:$B$13),""),0)),"")
 
Upvote 0
Ok, try this in A21, again entered with CTRL+SHIFT+ENTER and drag down
Code:
=IFERROR(INDEX($B$3:$B$13,MATCH(0,SI($B$18=$A$3:$A$13,COUNTIF($A$20:$A20,$B$3:$B$13),""),0)),"")

Something here don't seem right?

=IFERROR(INDEX($B$3:$B$13,MATCH(0,SI($B$18=$A$3:$A$13,COUNTIF($A$20:$A20,$B$3:$B$13),""),0)),"")
 
Upvote 0
sorry i use the spanish version of excel because im in mexico and have to translate them manually. just change the "si" to IF
 
Upvote 0
sorry i use the spanish version of excel because im in mexico and have to translate them manually. just change the "si" to IF


Gosh... never knew the formulas will differ across languages.

Looks like that Fixed it

Thanks Alot :)
 
Upvote 0

Forum statistics

Threads
1,215,580
Messages
6,125,654
Members
449,245
Latest member
PatrickL

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