Index Match function using non-contiguous columns in table

ou812eh

New Member
Joined
Jan 28, 2010
Messages
8
I'm looking to return values, numeric, and text from an lookup (index match) from non-contiguous columns in a table.

Ex. if Age is greater than 60 return:Last Name | First Name | Age | Full Age (yrs, months, days)
SmithJohn A.6767 years,8 month(s), 21 Days

<tbody>
</tbody>

This data would be pulled from another worksheet (table) in the same workbook.

Ex.

Data (from Membership worksheet)
JoeBabcock307-191 Queen St.AnytownNBCanadaA1A 1A3555-211-21233email@gmail.comPostCarla (GF)September 29, 195396464 years,8 month(s), 18 Days
JoeArmstrong198 Court St.AnytownONCanadaA1A 1A1555-211-21211email@gmail.comPostIreneMarch 17, 195935959 years,2 month(s), 30 Days
JoeBaumannBuffalo Rd. Group BoxAnytownONCanadaA1A 1A5555-211-21252email@gmail.comPostSeptember 25, 196395454 years,8 month(s), 22 Days
JoeBaker400 North Mill St.AnytownONCanadaA1A 1A4555-211-21241email@gmail.comEmailPamJanuary 27, 197614242 years,4 month(s), 20 Days
JoeBedell101-7810 Ethel St.AnytownONCanadaA1A 1A7555-211-21271email@gmail.comEmailTrishMay 27, 198753131 years,20 Days
JoeBearss1490 Nigh Rd., RR#1AnytownONCanadaA1A 1A6555-211-21263email@gmail.comEmailNovember 26, 1996112121 years,6 month(s), 21 Days
JoeArseneau3467 Murray St.AnytownONCanadaA1A 1A2555-211-21222email@gmail.comEmailLauraMarch 12, 199832020 years,3 month(s), 4 Days

<tbody>
</tbody>

Result (on Long Service worksheet)

LastFirstAgeFull Age
BabcockJoe6464 years,8 month(s), 18 Days
ArmstrongJoe5959 years,2 month(s), 30 Days
BaumannJoe5454 years,8 month(s), 22 Days

<tbody>
</tbody>

I had hoped to attach the dummy workbook.
Thank you.
 
Last edited:

Excel Facts

Test for Multiple Conditions in IF?
Use AND(test, test, test, test) or OR(test, test, test, ...) as the logical_test argument of IF.
What is given in Long Service and what must be retrieved from Data?


Aladin,
I don't know that I understand your question.


I'm looking to return values, numeric, and text from an lookup (index match) from non-contiguous columns in a table. if Age is greater than X (60) then i want the corresponding information - first name, last name, age and full age.

From Data (Membership)
if Age is greater than 60 return:Last Name | First Name | Age | Full Age (yrs, months, days)
 
Upvote 0
Hi Ou812eh,

Copy the data into A2 to O8 to understand the formula. Then you can modify range references to suit your needs.

Copy Last Name, First Name, Age and Full age in A10, B10, C10 and D10

Enter the following array formula in A11 by pressing Shift + Control + Enter

=IFERROR(INDEX($B$2:$B$8,MATCH(SMALL((IF($N$2:$N$8>=60,ROW($N$2:$N$8)-1)),ROW(A11)-10),IF($N$2:$N$8>=60,ROW($N$2:$N$8)-1),0)),"")

Enter the following array formula in B11

=IFERROR(INDEX($A$2:$A$8,MATCH(SMALL((IF($N$2:$N$8>=60,ROW($N$2:$N$8)-1)),ROW(A11)-10),IF($N$2:$N$8>=60,ROW($N$2:$N$8)-1),0)),"")

Enter the following array formula in C11

=IFERROR(INDEX($N$2:$N$8,MATCH(SMALL((IF($N$2:$N$8>=60,ROW($N$2:$N$8)-1)),ROW(A11)-10),IF($N$2:$N$8>=60,ROW($N$2:$N$8)-1),0)),"")

Enter the last array formula in D11

=IFERROR(INDEX($O$2:$O$8,MATCH(SMALL((IF($N$2:$N$8>=60,ROW($N$2:$N$8)-1)),ROW(A11)-10),IF($N$2:$N$8>=60,ROW($N$2:$N$8)-1),0)),"")

Let us know how you go.

Kind regards

Saba
 
Upvote 0
Solution
Aladin,
I don't know that I understand your question.


I'm looking to return values, numeric, and text from an lookup (index match) from non-contiguous columns in a table. if Age is greater than X (60) then i want the corresponding information - first name, last name, age and full age.

From Data (Membership)
if Age is greater than 60 return:Last Name | First Name | Age | Full Age (yrs, months, days)


Book1
ABNO
1first namelast nameagefull age
2JoeBabcock6464 years,8 month(s), 18 Days
3JoeArmstrong5959 years,2 month(s), 30 Days
4JoeBaumann5454 years,8 month(s), 22 Days
5JoeBaker4242 years,4 month(s), 20 Days
6JoeBedell3131 years,20 Days
7JoeBearss2121 years,6 month(s), 21 Days
8JoeArseneau2020 years,3 month(s), 4 Days
Data



Book1
ABCDE
1503
2idxlast namefirst nameagefull age
31BabcockJoe6464 years,8 month(s), 18 Days
42ArmstrongJoe5959 years,2 month(s), 30 Days
53BaumannJoe5454 years,8 month(s), 22 Days
6
Long Service


In B1 just enter:

=COUNTIFS(Data!N2:N8,">"&A1)

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

=IF(ROWS($A$3:A3)>$B$1,"",SMALL(IF(Data!$N$2:$N$8>$B$1,ROW(Data!$A$2:$O$8)-ROW(INDEX(Data!$A$2:$O$8,1,1))+1),ROWS($A$3:A3)))

In B3 just enter and copy down:

=IF($A3="","",INDEX(Data!$A$2:$O$8,$A3,MATCH(B$2,Data!$A$1:$O$1,0)))
 
Upvote 0

Forum statistics

Threads
1,214,804
Messages
6,121,652
Members
449,045
Latest member
Marcus05

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