I'm looking to look up 2 values on another worksheet and return a third column value in a cell.
It doesn't appear to like the bracket after Match containing the array.
=INDEX(Table9[#[Date of Last Review]], MATCH([#Name]&'Hot Water Safety'!G1, Table9[#Name]&Table9[#[Risk Assessment or Other Document Title]], 0))
I've also tried this without table referencing using the worksheet reference instead.
Related
I have a table that I want to export the data to a table that contains a column of names, dates and attendance so that it takes the values from the table
like this picture
You want INDEX and MATCH. See the formula at this Google Sheet, but it will work the same in Excel This is the top of the two examples:
https://docs.google.com/spreadsheets/d/1bvp6-Jb82A-AEOxvnMLzUNxWUSCKt1merc2nfSt3viE/edit?usp=sharing
=INDEX(F10:M13, match(O13, F10:F13, 0), match(P13, F10:M10, 0))
INDEX takes a range, and two numbers, one for the row and one for the column, and returns the value (or reference) at that intersection. You can pass false or null for either one of the numbers and return the entire row or column of the range, or if you are working with a single dimensional array, like a row or a column, you can just pass one number to it.
MATCH takes a value and a range (and an optional lookup type) and returns the index of that value in the range.
So using INDEX with two MATCHes, you can find the row and column of the data you are looking for.
DOCS:
https://support.microsoft.com/en-us/office/index-function-a5dcf0dd-996d-40a4-a822-b56b061328bd
https://support.microsoft.com/en-us/office/match-function-e8dffd45-c762-47d6-bf89-533f4a37673a
It is possible to do this with VLOOKUP, but I find INDEX/MATCH to be more intuitive and more flexible. Here is a VLOOKUP implementation. It is the bottom of the two examples on the demo sheet:
=vlookup(O16, F10:M13, match(P16, F10:M10, 0))
As you can see, you still pass it the data range and use match to get the column, but VLOOKUP will find the row with the lookup value for you, as long as it is in the first column. INDEX/MATCH lacks this limitation, and I find the arguments more logical: INDEX(range, row, column) vs VLOOKUP(lookup value, range, column).
I have an Excel workbook with 2 sheets.
I want to use Sheet 1 as the source to populate a column in Sheet 2.
Sheet 2, Column B has a list of resource names
Sheet 1, contains many of the same names in Column A, and a list of managers in Column F
I want to populate a separate column in Sheet 2 with the managers name from Sheet 1 based on matching the resource names.
I want to get a result of NOT FOUND if names don't match
I've tried
IFERROR(VLOOKUP(B8,'SHEET 1',!$A$3:$AR:100,6,FALSE),"NOT FOUND"), but this formula always returns "NOT FOUND" even though there are matches in Sheet 1
Looks like the ranges in your vlookup are a little wonky, e.g., 'SHEET 1',!$A$3:$AR:100
To be a little more straighforward, let's give you an index/match formula, so you can more easily specify the search array from the output array:
=IfError(Index(Sheets1!$B:$B,Match(Sheets2!B8,Sheets1!$A:$A,0)),"Not Found")
How this works is you Match() the cell on Sheets2! (B8 from your example formula) within the search array, Sheets1!$A:$A (yes, you can use a whole column which makes things a little easier). If nothing is matched, it throws an error (so if-error handles that); if it is found, then it will output (index) based on the output array, Sheets1!$B:$B.
You will want to fix the search array column and output array column to fit your scenario.
I have write below array formula:
=INDEX(Table1[Column2],SMALL(IF(Sheet1!G6=Table1[Column1],ROW(Table1[Column1])-ROW(Table1[[#Headers],[Column1]])),ROW($A:$A)))
According this picture1:
Note that selected range contains above array formula.
I need define that array formula returned values in the list form of data validation for Column2 of right table.
What I had tried:
I defined a Name, because responsively Sheet1!G6 reference part of above formula have change in Column2 cells for its appropriated Column1 cell. (in right table), according to below picture2:
Then set Column2 of right table's data validation, (picture3 below):
The problem is
But in result, validation list only contains first result of array formula! as picture4 below:
Question
How can define an array formula valued results set to a Name (Picture 2 above) and use in List Data Validation (picture 3 above) for a Column of table ? (Picture 4 above)
My concepts are:
There where a array form formula as shown above. (On the paper and
not in a worksheets range, yet)
This array formula is corresponding to a set -collection- of (potentially returned) results.
I want use above set in the Data-Validaton List for a special Table column.
Not using helper things (as Sheet, Column, Pivot-table and Etc...)
Using (1)- Name (Ctrl + F3), (2)- the array formula (for generating valid results collection), and (3)- Data-Validation List (to check is entered value in above special Table column is valid or not valid; and let entering only valid data in that special column))
I know you said you don't want to use a helper column or sheet. But saying:
A Table and an array formula can't coexist.
Data validation source can't be a complex formula of any kind, but you can use Indirect to a named range or address (but only if its a continuous region, not multiple areas) on the source formula if you want.
An array is never returned as a whole result in array formula, each cell used on as target destiny of the calculation is an item of the returned array.
So what I would do, return the array formula in a region let's Say A1, and a counter to the number of items in your array result that are valid using another cell B1. Use a cell C1 to determine the address of the list that you want to use. Then use =INDIRECT(C1) in the source of your validation.
You can hide other sheet so another use can't see it, and if you hide it by macro you can set it to very hidden and it's not possible to make it visible from the workbook directly. You might also create a named range to the C1 cell in my example so the end user can't see where this source on validation is from.
I have to use
=COLUMN($L$1:$CA$1)
as part of my original formula that CA, is the last column for a table named MyTable.
Because the last column is always changing (add columns every month),
i want to use
=COLUMN($L$1:ADDRESS(1,COLUMNS(MyTable)))
but this is not work.
My question is: how can i add last column of a table to a part of specific range?
ADDRESS returns a string. But the range reference in COLUMN($L$1:...) needs a cell reference after the :. INDEX will return a cell reference.
So try within your formula:
...COLUMN($L$1:INDEX(MyTable,1,COLUMNS(MyTable)))...
Currently I have a huge formula in my excel sheet:
=SUM(SUMIF(INDIRECT(A9&"!$F:$F"),"working";INDIRECT(A9&"!$B:$B"))+SUMIF(INDIRECT(A9&"!$F:$F");"Open";INDIRECT(A9&"!$B:$B"))+SUMIF(INDIRECT(A9&"!$F:$F");"internal",INDIRECT(A9&"!$B:$B"))+(SUMIF(INDIRECT(A9&"!$F:$F"),"finished";INDIRECT(A9&"!$AP:$AP"))))
In A9 is the name of the excel sheet that the formula has to use. So for example in A3 there's '20140612', so it has to use the excel sheet with the name '20140612'. Furthermore it sums up some values depending on some conditions.
My question is: I would like to direct the columns in the other sheets by their headlines, not their positions in the sheet. So for example le column AP doesn't always has to be in the position AP, but has always the headline 'Points'.
Can you think of an adaption of the formula that can direct the column by their headline?
I though of the MATCH formula. But I'm not to sure where I have to put this in.
I think the simplest answer would be to use named ranges within your sheet. In this way you could name a range (currently in column AP) as 'Points', change your formula to use 'Points' instead of '$AP:$AP' & if you move your points data about the formulas would be unchanged.
If you are planning to keep changing your header row values then you could use HLOOKUP to match up the header column probably in conjunction with MATCH & INDEX.
To answer your question about the usage of MATCH(), it's worth thinking of it as half of a VLOOKUP() or HLOOKUP(), i.e. it's the bit that finds the row or column containing the value you're searching for, then you can use INDEX() to get that row / column from a range you specify.
So, if you know that one of your column headings is "Points", then you could find it by using:
=MATCH("Points", A1:Z1, FALSE)
...which would return 10 if "Points" were the heading of column J for example. If you wanted to then use that column for a lookup, you can use OFFSET() to define that column as a range to use for a lookup, so let's say I wanted to find the text "foo" in the "Points" column, I could use:
=MATCH("foo", OFFSET(A1:Z1000, 0, MATCH("Points", A1:Z1, FALSE) - 1, 1000, 1), false)
... which uses the column index I found before as an input to OFFSET() in order to dynamically reference J1:J1000 and then search for "foo" in that column.
For your example in the question, rather than A1:Z1000 you could use a call to INDIRECT() that would return the entire range of interest from your source sheet.