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

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))

Related

How to do Multi Criteria Match Index Function

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)),"")

how to return a value if a condition on one column is null

i what part of a column to fill another full column column if the first cell is null
for instance this sheet {sheet 1} is the sheet i want the data in from the other sheet {sheet 2} to fill
(Please view imgs as they are vital to the question)
{Sheet1}
this is the other spreadsheet i want the data to be extracted from
{Sheet2}
so i want column 1, 2, 3 (in {sheet 2} ) to be filled with contents from column 1, 2, 5 in {sheet 1} ONLY IF Column 1 in {sheet 1} = Column 1 in {sheet 2} which is null.
Essentially I want to I want column one, three and five (in sheet 1) to fill in sheet 2 columns 1, 2 and 3 only if column one in sheet 1 is null. See attached photos
i tried with VLOOKUP but no luck
thanks a bunch
#Seamus if i understand correctly try:
Sheet 2
Column 1=IF(Sheet1!$A$1="Null",Sheet1!A1,"")
Column 2=IF(Sheet1!$A$1="Null",Sheet1!C1,"")
Column 3=IF(Sheet1!$A$1="Null",Sheet1!E1,"")
If the value you are looking for is an empty cell try:
Column 1=IF(Sheet1!$A$1="",Sheet1!A1,"")
Column 2=IF(Sheet1!$A$1="",Sheet1!C1,"")
Column 3=IF(Sheet1!$A$1="",Sheet1!E1,"")

Match descriptions and copy/paste associated quantity

In Sheet 1, column A contains a list of product names and column B a list of quantities. The number of rows is variable and could be a minimum of 1 and a maximum of 15 (from row 62 to 76 - blank rows are automatically hidden). In Sheet 2, column A contains the same product list, but all 15 of them, ie Sheet 1 is a dynamic range and Sheet 2 is a static range. I am attempting to set up a VBA procedure whereby the macro will match the product in column A62 (Sheet 1) with column A4-18 (Sheet 2), copy the corresponding quantity from column B in Sheet 1 to column B in Sheet 2 and then move down the product list in Sheet 1, doing the same till it reaches the end of the dynamic range.
If anyone can assist or point me in the right direction, I'd be very grateful. Many thanks.

What formula do I use to get the answer from sheet 2, column B into sheet 1, column R, by having the part number be the only link to both sheets?

enter image description hereWhat formula do I use to get the answer from sheet 2, column B into sheet 1, column R, by having the part number be the only link to both sheets?
I need to get the pre-set cost value in sheet 2 into an ever-changing sheet 1 spreadsheet. The cost stays the same-sheet 2 is my legend, but different numbers are in-putted into sheet 1 all the time, and I want the cost to automatically populate from sheet 2 into sheet 1. Each number needs a cost.
Example:
Sheet 1:
Column A Column R
3568 (need formula to = 7.30)
1660 (need formula to = 1.50)
Sheet 2: Numerical-Once and a while new numbers will be added
Column A Column B
0270 2.20
1660 1.50
2610 8.00
3568 7.30
Where 0270 = 2.20, 1660 = 1.50, and so on...
Thanks in advance!
Try this formula in column R, starting in row 2
=vlookup(A2,Sheet2!$A$1:$C$1000,2,False)
If you omit the last parameter, it defaults to TRUE, which requires the data to be sorted and will return an approximate match if no exact match is found.
Also, if you copy the formula down, make sure that the lookup range has absolute references for columns AND rows, i.e. Sheet2!$A$1:$C$1000 and NOT Sheet2!$A1:$C1000

Spreadsheet: If row in sheet contains 2 criteria then get value of cell

Sheet 1 gets values from Sheet 2.
Sheet 2 has hundreds of rows, but only 4 columns. (Cols A & C are names, Cols B & D are numbers).
Cell XX (sheet 1): Looks in Sheet 2, For "Bill" (col A) and "Jill" (col C) where they BOTH appear in the same row, then returns number from col B (from row where "Bill" and "Jill" are found) to Cell XX in sheet 1.
If "Jill" is in col A and "Bill" is in col C - then conditions are not met, and do not return value.
How do I write this?
I am so confused. PLEASE, someone help me?
Lookup Sheet 2 For "Bill" (Col A2:A300) AND "Jill" (Col C2:C300) Get number in Col B.
One solution is to create a helper column E. Use this formula in the first row (i.e. cell E1):
=$A1 & "-" & $A3
and fill this down for the other rows. If ColA = "Bill" and ColB = "Jill", then ColE will be "Bill-Jill".
You can then do a MATCH to find out with row has "Bill-Jill", and pick up the corresponding value from ColB:
=IF(ISNA(MATCH("Bill-Jill";e:e;0));"No match";INDEX(b:b;MATCH("Bill-Jill";e:e;0)))
The MATCH formula will find out which row contains "Bill-Jill", and the INDEX formula will pick up that row from another column. MATCH will return #NA if there isn't a matching cell, and this will be captured by the ISNA check.
I'm not sure if OpenOffice supports the MATCH function - it's definitely part of Excel though.

Resources