Lookup multiple values in different columns and return a single value
Table of contents
- Lookup multiple values in different columns and return a single value
- Lookup multiple values in different columns and return multiple values
Lookup multiple values in different columns and return a single value
I m working on the below table.
ORDER MODEL MATERIAL QTY STATUS
BOM a s6 1 COMPLETED
BOM b c6 2 NOT COMPLETED
BOM c s6 1 COMPLETED
DEL d c6 3 NOT COMPLETED
EXP a a8 4 IN PROGRESS
DEL b d2 5 COMPLETED
DEL c c6 4 NOT COMPLETED
DEL d s6 7 NOT COMPLETED
DEL e c6 8 NOT COMPLETED
DEL r a8 1 COMPLETED
EXP g d1 5 COMPLETED
EXP r c6 9 COMPLETED
EXP t a8 2 COMPLETED
EXP a c6 1 NOT COMPLETED
EXP b s6 9 COMPLETED
EXP c c6 1 NOT COMPLETED
EXP d a8 4 NOT COMPLETED
I need the status column to be vlooked up on another file by comparing all the remaining 4 columns.(the sheet to be updated carries the 4 columns not in the same order as in the original sheet.. its mixed).. Pls help me with dis..
Thanks
S.Babu
Answer:
Sheet1
Sheet2
Array formula in cell E2, sheet2:
How to create an array formula
- Select cell E2
- Paste array formula
- Press and hold Ctrl + Shift
- Press Enter
How to copy array formula
- Select cell E2
- Copy cell (Ctrl + c)
- Select cell E3:E20
- Paste (Ctrl + v)
Explaining array formula in cell E2
Step 1 - Count the number of cells by a given set of criteria
COUNTIFS(Sheet2!A2, Sheet1!$D$2:$D$18, Sheet2!B2, Sheet1!$B$2:$B$18, Sheet2!C2, Sheet1!$C$2:$C$18, Sheet2!D2, Sheet1!$A$2:$A$18)
becomes
COUNTIFS(Sheet2!A2, Sheet1!$D$2:$D$18, Sheet2!B2, Sheet1!$B$2:$B$18, Sheet2!C2, Sheet1!$C$2:$C$18, Sheet2!D2, Sheet1!$A$2:$A$18)
and returns {0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
Step 2 - Return the relative position of an item in an array that matches a specified value
MATCH(1, COUNTIFS(Sheet2!A2, Sheet1!$D$2:$D$18, Sheet2!B2, Sheet1!$B$2:$B$18, Sheet2!C2, Sheet1!$C$2:$C$18, Sheet2!D2, Sheet1!$A$2:$A$18), 0)
becomes
MATCH(1, {0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 0)
and returns 3.
Step 3 - Return the value of a cell at the intersection of a particular row and column
INDEX(Sheet1!$E$2:$E$18, MATCH(1, COUNTIFS(Sheet2!A2, Sheet1!$D$2:$D$18, Sheet2!B2, Sheet1!$B$2:$B$18, Sheet2!C2, Sheet1!$C$2:$C$18, Sheet2!D2, Sheet1!$A$2:$A$18), 0))
becomes
INDEX(Sheet1!$E$2:$E$18, 3)
and returns "COMPLETED" in cell E2.
Download excel *.xlsx file
Lookup multiple values in different columns and return multiple values
I have a set of data, like the one you used in the original example that also has a column for the date of the transaction. I would like my Index-type formula to search for both the main item (the rep's name) and also if the date of the transaction falls in the date range).
Start Date: 11/26/2012
End Date: 11/30/2012 (both entered by the user)
Rep: John
Then the results, in each row/column of the 'result' section (INDEX formula results) would show results for John that occurred from 11/26 to 11/30 (including both dates).
Thanks for any help with the formula for that.
Jason
Answer:
Array formula in cell B18:
How to create an array formula
See steps above!
How to copy an array fomula
See steps above!
Explaining array formula in cell B18
Step 1 - Compare value in cell B15 to cell range $B$2:$B$11
$B$15=$B$2:$B$11
becomes
"John"={"John";"Jennifer";"Laura";"Paul";"John";"Laura";"Jennifer";"Paul";"Paul";"John"}
and returns
{TRUE;FALSE;FALSE;FALSE;TRUE;FALSE;FALSE;FALSE;FALSE;TRUE}
Step 2 - Compare start and end date to date column
($A$2:$A$11<=$B$14)*($A$2:$A$11>=$B$13)
becomes
({TRUE; TRUE; TRUE; TRUE; TRUE; TRUE; TRUE; FALSE; FALSE; FALSE})*({TRUE; TRUE; TRUE; TRUE; TRUE; TRUE; TRUE; TRUE; TRUE; TRUE})
and returns
{1;1;1;1;1;1;1;0;0;0}
Step 3 - If a record is a match return it´s row number
IF(($B$15=$B$2:$B$11)*($A$2:$A$11<=$B$14)*($A$2:$A$11>=$B$13),MATCH(ROW($A$2:$A$11),ROW($A$2:$A$11))
becomes
IF({TRUE; FALSE; FALSE; FALSE; TRUE; FALSE; FALSE; FALSE; FALSE; TRUE}*{1;1;1;1;1;1;1;0;0;0},MATCH(ROW($A$2:$A$11),ROW($A$2:$A$11))
becomes
IF({1;0;0;0;1;0;0;0;0;0},{1; 2; 3; 4; 5; 6; 7; 8; 9; 10})
and returns
{1;FALSE;FALSE;FALSE;5;FALSE;FALSE;FALSE;FALSE;FALSE}
Step 4 - Return the k-th smallest value
SMALL(IF(($B$15=$B$2:$B$11)*($A$2:$A$11<=$B$14)*($A$2:$A$11>=$B$13),MATCH(ROW($A$2:$A$11),ROW($A$2:$A$11)),""),ROW(A1))
becomes
SMALL({1; FALSE; FALSE; FALSE; 5; FALSE; FALSE; FALSE; FALSE; FALSE},ROW(A1))
becomes
SMALL({1; FALSE; FALSE; FALSE; 5; FALSE; FALSE; FALSE; FALSE; FALSE},1)
and returns 1
Step 5 - Return the value of a cell at the intersection of a particular row and column
INDEX($C$2:$C$11,SMALL(IF(($B$15=$B$2:$B$11)*($A$2:$A$11<=$B$14)*($A$2:$A$11>=$B$13),MATCH(ROW($A$2:$A$11),ROW($A$2:$A$11)),""),ROW(A1)))
becomes
INDEX($C$2:$C$11,1)
becomes
INDEX({"A"; "B"; "C"; "D"; "E"; "F"; "G"; "H"; "I"; "J"},1)
and returns A in cell B18
Download excel *.xlsx file
Lookup multiple values in different columns and return multiple values.xlsx
Related posts:
Lookup and return multiple values from a range excluding blanks
Lookup values in a range using two or more criteria and return multiple matches in excel
Excel: Look for values containing a lookup value and return multiple values horizontally
Lookup a value in a list and return multiple matches in excel





















ENTER IPC AET010AX
ACCT TYPE
Z.INP #N/A
Z.INPCDRHB #N/A
Z.INPCDTOX #N/A
Z.INPCDU #N/A
I want to be able to enter an IPC and have it come back with responsibility based on IPC and Acct type from the following table.
IPC SYSTEM ACCT TYPE RESPONSIBILITY
AET010AX CAMIS Z.INP Aetna
AET015AX CAMIS Z.INP Aetna Senior
AET015CC CAMIS Z.INP AETNA
BLC010AX CAMIS Z.INP Blue Cross
BLC015AX CAMIS Z.INP Blue Cross Senior
BLC015CC CAMIS Z.INP BLUE CROSS
BLC400CC CAMIS Z.INP BLUE CROSS
BLS010AX CAMIS Z.INP Blue Shield
I was using index with match with no luck. HELP
Candy,
Sheet2
Sheet1
Array formula in cell B4:
see attached file:
Candy.xlsx
i need to extract the headers from a grid based on value in left most column
example
row header ---> a b c d e
data 1 1 2 2 2
2 1 1
1 1 1 2
so how to find out which all headers appear agst 1 or 2o 3 in each row
vikas,
Read this post:
Match a criterion and extract multiple corresponding table headers
I have a worksheet(#1) and I want to populate the amount Column with data in another worksheet in the same workbook, Based on 2 criteria: State and Date
Worksheet #2 Table A1:D19 = EST
ColA ColB ColC ColD
1 AK 5/31 1st Installment 53,397.00
2 AK 8/31 2nd Installment 53,397.00
3 AK 11/30 3rd Installment -
4 AL 5/15 1st Installment -
5 AL 8/15 2nd Installment 53,349.00
6 AL 11/15 3rd Installment -
7 AR 5/15 1st Installment 33,237.00
8 AR 8/15 2nd Installment 33,237.18
9 AR 11/15 3rd Installment -
10 AZ 3/15 1st Installment 62,738.89
11 AZ 4/15 2nd Installment 62,738.89
12 AZ 5/15 3rd Installment 62,738.89
13 AZ 6/15 4th Installment 137,986.05
14 AZ 7/15 5th Installment 81,550.68
15 AZ 8/15 6th Installment 81,550.68
16 CA 4/1 1st Installment 495,364.00
17 CA 6/1 2nd Installment 495,364.00
18 CA 9/1 3rd Installment 495,364.00
19 CA 12/1 4th Installment -
Worksheet #1 I need the Worksheet 2 ColD amount to be put in the corresponding State and Date ColE on this worksheet. Can you help?
ColA ColB ColC ColD ColE
1 AK 5/31 -
2 AK 8/31 -
3 AK 11/30 -
4 AL 5/15 -
5 AL 8/15 -
6 AL 11/15 -
7 AZ 3/15 -
8 AZ 4/15 -
9 AZ 5/15 -
10 AZ 6/15 -
11 AZ 7/15 -
12 AZ 8/15 -
13 AR 5/15 -
14 AR 8/14 -
15 AR 11/14 -
16 CA 4/1 -
17 CA 6/1 -
18 CA 9/1 -
19 CA 12/1 -
Phoneix ,
read this: Fetch data from another table
[...] shift enter NOT just enter, they can then be copied down. You may find some useful tips here.... Lookup multiple values in different columns and return a single value | Get Digital Help - Microsoft... Explaining a formula: Lookup values in a range using two or more criteria and return multiple [...]