How to do Multi Criteria Match Index Function - excel

I am trying to use Index/Match function to populate Column B of Sheet 1 based on the data in Sheet 2.
Sheet 1:
Below is how the sheet 2 looks like. Row 1 contains the line number. Column B and Column C belong to Line 1, and Column D and E belong to Line 2, etc.
I need to match the Project ID first. Then match the Activity Line # (Column C of sheet 1 with B1:G1 of sheet 2), then find the corresponding Activity #.
For example, on sheet one, it is asking for Activity # of Project 0000002/Activity Line 2, which should be "ES" based on the sheet 2.
So, ideally, the result should look like below
This is what I have for now, but it’s giving me a #REF! error…
=IFNA(INDEX('Sheet2'!$B:$G, MATCH('Sheet1'!C2, INDEX('Sheet2'!$B$1:$G$1, MATCH('Sheet1'!A2, 'Sheet2'!$A:$A,0),0),0)),"")

Use:
=IFERROR(INDEX('Sheet2'!$B:$G,MATCH(A2,'Sheet2'!$A:$A,0),MATCH(C2,'Sheet2'!$B$1:$G$1,0)),"")

Related

how do I swap a cell in a column to another cell in another column for every nth row

This is what I have: This is what I want:
A B C A B C
1 b ab ab ab
2 x x x x
3 c ac ac ac
And there are several hundred rows below. What I need is to replace the content of column A with the content of Column B for every nth row
Not sure how complex your data are, but here's a hacky method as long as "nth" is consistent and you don't mind duplicating your data into another sheet or columns.
For example, let's say you want to replace the value for every 4th row, starting with the first row of data.
Add a column to your original data (in this case, I'm calling it "whatever"), then start numbering your rows as 4, 5, 6, etc.
Create a column for your new "A-value", and insert a formula such as this, which is checking if the value in the "whatever" column is divisible by 4, and if so, then replace a-value with b-value.
=IF(MOD(A3,4),B3,C3)
Then determine how you want to put together your final data. Copy/paste as special values into another sheet, or whatever works best for you.

Excel Index Match syntax question. getting a #N/A

I starting to get the concept of how Index and Match are supposed to work, but confused as to why this formula does not work.
I have 4 user sheets with tables in use, combining data from 3 into one. This is my current setup, which is working well so far.
Sheet1 "tblClickers" (export from phishing report):
Column A = Email
Column B/C = First/Last Name
Column N = phish failure data
Sheet2 "TblAD_US" (AD Export):
Column A = Title
Column C = Name
Column E = Email
Column F = Department #
Sheet3 "TblComb": combination sheet listing relevant data from other three.
Column A = "=tblAD_US[title]"
Column B = "=tblAD_US[Name]"
Column D = "=tblAD_US[EmailAddress]"
Column E = "=tblAD_US[Department]"
Column K = "=INDEX(tblClickers[Failures],MATCH([#[Email Address]],tblClickers[Email Address],0))"
Sheet4 "TblAD_Depts" (report listing department heads):
- column c = Department #
- Column D = Department head
I now want another column in Sheet 3 that lists the matching department head (sheet4/columnD) associated with the departments of each user. The data point I will match on is the Department# listed in Sheet 2/3 and Sheet 4.
I tried using the same formula syntax as I did for Clickers, but I'm getting a #N/A error.
=INDEX(TblAD_Depts[Department Head],MATCH([#Department],Tbl_Am_Depts[Department],0))
Where am I getting mixed up here? Do I need to reference the original data source for "Department#" in sheet 2 or can I "reference the reference" in sheet3?
tl;dr, want a new column L in Sheet 3. Values returned will be column D from Sheet 4, using Column E in sheet 3 and Column C in sheet 4 to match on.
Okay, (#JvdV) had it figured out. Even though I selected each column for "Department" and changed the format to [Number], one column was still listed incorrectly.
For some reason, Column C in Sheet 4 had each "Number Stored as Text". I'll just do a [Text to Column] and call it a day!
Thanks!

Copy values from cells from one sheet to another with MATCH and INDEX

Sheet 1:
Taxon names in column B
Sheet 2:
Taxon names in column A (range defined with the name "Taxon"; A:A)
Names of the parameters in columns C through L (range defined with the name "FeedingType"; C3:L3)
Values linked to the taxa in columns C through L (range defined with the name
"IndexArea"; C4:L1248)
Nature of data: Taxon names on sheet 1 & 2 are not ordered in the same manner, and the taxon names on sheet 1 is a subset of taxa names of sheet 2.
What I want done: I want to copy the values linked to taxa from columns C through L in sheet 2 to the same taxa in sheet 1 in the columns K through T.
So, if I have a "Hydra viridissima (Sheet 2, A6) somewhere in sheet 1, it should bring the values "5" (Sheet 2, J6 under "pre") and "5" (Sheet 2, L6 under "oth") to their respective cells in Sheet 1, which in this case would be in columns R and T.
What I have tried: Went through a tutorial and thought I had it with:
=INDEX(IndexArea,MATCH(B2,Taxon,0),MATCH($K$1,FeedingType,0))
It's not working, though it does identify when things are not matching exactly (#N/B).
I tried to add sheet2! in the formula in reference to names assigned to the ranges like this: =INDEX(Sheet2!IndexArea,MATCH(B2,Sheet2!Taxon,0),MATCH($K$1,Sheet2!FeedingType,0)), but gives the same error.
Can anyone help me out?
Thanks!
Your formula treats Taxon, FeedingType and IndexArea as defined names but your narrative doesn't mention them being assigned defined names. Try it as row and column references.
' in US-EN
=INDEX(Sheet2!$B:$M, MATCH($B2, Sheet2!$A:$A, 0), MATCH(K$1, Sheet2!$B$3:$M$3, 0))
' should the *FeedingType* come from column J?
=INDEX(Sheet2!$B:$M, MATCH($B2, Sheet2!$A:$A, 0), MATCH($J2, Sheet2!$B$3:$M$3, 0))

how can i combine multiple columns from different sheets

I have a large database where one column in each sheet is the same. the number of rows vary, since there are several codes used more than once. example:
Sheet 1: column 1 (client ID) --> column 2 (client name)
Sheet 2: column 1 (client ID)--> column 2 (loan ID)
sheet 3: column 1 (loan ID) ---> column 2 (loan info)
So I was hoping to get one row with client name (sheet 1) and loan info (sheet 3) plus all the pertaining information in sheet 3
If you're using Excel, vLookup or Index + Match would probably do the trick. Alternatively, you could use Access to query the results your looking for, however that would take a bit more time to setup.
In the sheet you want the data to display you would use the Vlookup for the specified person in Sheets 1 and then again on Sheet 2.
'Output
Name State Loan ID Date of service
Bob AK 112233 1/1/2001
'Formulas
VLOOKUP($A3,Sheet1!$A:$C, 2, FALSE) VLOOKUP($A3,Sheet1!$A:$C, 3, FALSE) VLOOKUP(A3, Sheet2!$A2:$C5, 3, FALSE)

Identify matching numbers and then imput a value from a different column

I have two sheets, Sheet1 and Sheet2. Sheet1 has a list of company names in column A, Revenue in column B and a unique number identifier in column D (also seen as "unique #forAAA in Sheet2). In Sheet2, I pulled a list from Hoovers, and the format comes up something like below (so this format should not be changed).
Column A B C D
Company Name Place Type of Comp Revenue
1 AAA US HQ 10.0 M
2 unique #forAAA
3 BBB India Branch 5.0 M
4 unique #forBBB
What I'd like to do is match the unique number for each company between Sheet1 and Sheet2 and then put the revenue # from Sheet2 into column B of Sheet1 which corresponds to the correct #. I'm pretty lost here, so any help or ideas would be great. Thanks for your help!
Because the unique identifier is on a different row than the result to be returned, you can use a variation using INDEX and MATCH:
=INDEX(Sheet2!D:D, MATCH(D2, Sheet2!A:A, 0)-1)
INDEX will return the value within range Sheet2!D:D on row MATCH(D2, Sheet2!A:A, 0)-1.
MATCH(D2, Sheet2!A:A, 0) will give you the row number where the unique ID is found, then -1 to get the row number of the revenue amount.
EDIT: As per comment, to remove the M, you can use this:
=TRIM(SUBSTITUTE(INDEX(Sheet2!D:D, MATCH(D2, Sheet2!A:A, 0)-1),"M",""))
I would put the unique value in a column inserted before A (would be the new column A) instead of putting it below each row. Then, in the other sheet I'd put the VLOOKUP like this:
=VLOOKUP(D2,Sheet2!A:E,5,0)
That should return the value in column E (column D before the column insertion, i.e. revenue for the unique company identifier).
Note that the third argument in the vlookup function is the number of the column you want to be retrieved, so the range defined in the second argument (Sheet2!A:E) should contain that column.

Resources