INDEX MATCH-Multiple results with multiple columns

themick

New Member
Joined
May 26, 2018
Messages
48
My data table will have several thousand rows so below is asnippet to illustrate the problem.


Column G, ‘LOOKUPS’, is what I need to search out to match in ColumnB. There will be multiple instances of this number (not always) but most of the time, yes.

When it matches that number, it needs to put the results of the entire row so that a new table is created with just these matches, Columns I through M in this table.

I have tried various ways but need help on the Index/Match formula (if that is the best way to do this).

(Column A, JD=John Doe, so John Doe1, John Doe2, etc.)

If there is a link already discussing this, any help pointing mein that direction would be appreciated, thank you.

1

A

B

C

D

E

F

G

H

I

J

K

L

M

2

DATA
LOOKUPS

RESULTS

3
JD1
18-2899


1,575.00

76.32

1,651.32
18-2929
JD1
18-2929

30.00

-

30.00

4
JD1
18-2929

30.00

-

30.00
18-3006
JD2
18-2929

255.00

30.74

285.74

5
JD2
18-2929

255.00

30.74

285.74
18-3100
JD3
18-2929

255.00

-

255.00

6
JD3
18-2929

255.00

-

255.00
18-3124

7
JD1
18-2963

15.00

-

15.00
JD2
18-3006

825.00

37.03

862.03

8
JD2
18-3006

825.00

37.03

862.03
JD3
18-3006

459.00

-

459.00

9
JD3
18-3006

459.00

-

459.00
JD4
18-3006

1,140.00

20.29

1,160.29

10
JD4
18-3006

1,140.00

20.29

1,160.29
JD5
18-3006

500.00

25.00

525.00

11
JD1
18-3076

270.00

320.13

590.13

12
JD1
18-3082

1,635.00

17.10

1,652.10
JD3
18-3100

2,278.00

9.24

2,287.24

13
JD2
18-3089

1,260.00

28.67

1,288.67
JD4
18-3100

1,815.00

13.68

1,828.68

14
JD3
18-3100

2,278.00

9.24

2,287.24

15
JD4
18-3100

1,815.00

13.68

1,828.68
JD1
18-3124

1,224.00

21.83

1,245.83

16
JD1
18-3106

833.00

-

833.00
JD2
18-3124

300.00

4.27

304.27

17
JD1
18-3124

1,224.00

21.83

1,245.83
JD3
18-3124

-

4.82

4.82

18
JD2
18-3124

300.00

4.27

304.27

19
JD3
18-3124

-

4.82

4.82

20
JD5
18-3006

500.00

25.00

525.00

<tbody>
</tbody>
 
Last edited:

Excel Facts

Square and cube roots
The =SQRT(25) is a square root. For a cube root, use =125^(1/3). For a fourth root, use =625^(1/4).
A pivot table might do what you want. I labeled your columns Name, Code, Net, Tax, Total (for example sake). Create a pivot table in exisiting sheet (e.g. O2) with Rows being Code and Name, sigma values being sum of net, sum of tax, and sum of total. Result was the following when filtering Code for the ones to lookup. (Looked really close to your results, with the ability to filter the code allowing for easy changes)

Row LabelsSum of netSum of taxSum of total
18-292954030.74570.74
JD130030
JD225530.74285.74
JD32550255
18-3006292482.323006.32
JD282537.03862.03
JD34590459
JD4114020.291160.29
JD550025525
18-3100409322.924115.92
JD322789.242287.24
JD4181513.681828.68
18-3124152430.921554.92
JD1122421.831245.83
JD23004.27304.27
JD304.824.82
Grand Total9081166.99247.9

<tbody>
</tbody>
 
Last edited:
Upvote 0
A pivot table might do what you want. I labeled your columns Name, Code, Net, Tax, Total (for example sake). Create a pivot table in exisiting sheet (e.g. O2) with Rows being Code and Name, sigma values being sum of net, sum of tax, and sum of total. Result was the following when filtering Code for the ones to lookup. (Looked really close to your results, with the ability to filter the code allowing for easy changes)

Row Labels
Sum of net
Sum of tax
Sum of total
18-2929
540
30.74
570.74
JD1
30
30
JD2
255
30.74
285.74
JD3
255
255
18-3006
2924
82.32
3006.32
JD2
825
37.03
862.03
JD3
459
459
JD4
1140
20.29
1160.29
JD5
500
25
525
18-3100
4093
22.92
4115.92
JD3
2278
9.24
2287.24
JD4
1815
13.68
1828.68
18-3124
1524
30.92
1554.92
JD1
1224
21.83
1245.83
JD2
300
4.27
304.27
JD3
4.82
4.82
Grand Total
9081
166.9
9247.9

<tbody>
</tbody>

Thank you for that. I am working from version 2010 Excel , how do I filter based on external range/list? Than you
 
Upvote 0
Thank you for that. I am working from version 2010 Excel , how do I filter based on external range/list? Than you
Followup - the key here for me is, in the real data, the list is probably 75,000 rows and the filtered list is a set of lookup codes (Col G) 600-750 large - what is the best way to filter this so only those 600-750 are displayed using Excel 2010?
 
Upvote 0
Wow, that's a lot of lookups! Without VBA, I don't know how you'd do it without manually clicking all those boxes.
 
Upvote 0
Wow, that's a lot of lookups! Without VBA, I don't know how you'd do it without manually clicking all those boxes.
For now, I did was create a column using this formula on sample data:

=IF(ISNA(VLOOKUP($A2,$H$2:$H$501,1,FALSE)), "FALSE", "TRUE")

With ColH being the lookup values. I then filter it based on 'TRUE', this does give me the filtered list but I am wondering if this is the best way to do this...
Thank you -
 
Upvote 0

Forum statistics

Threads
1,214,958
Messages
6,122,475
Members
449,087
Latest member
RExcelSearch

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