Formulas and Functions

Formulas and Functions

Ask for help with your formula and find examples of how others use formulas and functions to solve a similar problem.

How to Index Match

✭✭✭✭
edited 01/27/23 in Formulas and Functions

Hi there,

Please help, I am not great at formulas!

I have a source Employee file that has all the information I need.

I want to add information from the Employee Info sheet to a training register on a different sheet.

There are several column items I want to bring into my sheet e.g. ID number, Job Title, etc


image.png


I have added a row with headers to reference in the formula.

I want to match the data between the two via the Smartsheet contact or "Consultant" name.

I have used the formula:

=INDEX({Employee Sheet Range 2}, MATCH(Consultant@row, {Employees Range 3}, 0), MATCH("ID No",{Employees Range 4}, 0))

Where Range 2 = all the selected columns e.g. ID, Job Title, Consultant

Where Range 3 = Employee Email/ Consultant column

Where Range 4 - Employee ID number column

When I pull through this it shows the ID number for the relevant person

However when I try to use the same formula in another column and change the Range 4 it changes the answer in the other column to the same value.


Anyone know how to resolve/ get this right?

Best Answer

  • Community Champion
    Answer ✓

    @Tamsyn Happy to help. 👍️


    Something to note:

    I frequently use INDEX/COLLECT as @sharkasits mentioned, but there are times where an INDEX/MATCH/MATCH as you have is in fact appropriate.


    INDEX/COLLECT is great if you are pulling from a single column but need to match on multiple columns.

    INDEX/MATCH/MATCH is more for referencing an entire table where you need to match on both the horizontal and vertical axis.

    INDEX/MATCH is for pulling from a single column (or row) while also matching on a single column (or row).


    INDEX/MATCH/MATCH: You want to be able to pull from every row in columns 16 through 19 based on a value in Column 15 as well as a value across the top row.

    =INDEX({Columns 16-19}, MATCH(2, {Column 15}, 0), MATCH("B", {Row 1}, 0))

    image.png


    INDEX/COLLECT: You want to pull from column 7 based on a match in both columns 15 and 16.

    =INDEX(COLLECT({Column 17}, {Column 15}, @cell = 3, {Column 16}, @cell = "B"), 1)

    image.png


    INDEX/MATCH: Similar to INDEX/COLLECT but you only want to match on a single column.

    =INDEX({Column 17}, MATCH(3, {Column 15}, 0))

    image.png


    INDEX/MATCH across a row: You can also use INDEX/MATCH to pull from across a single row and use the MATCH in the third portion of the INDEX function. Similar to INDEX/MATCH/MATCH, but the first MATCH is replaced with a 1 (row 1) since there is only 1 row being referenced.

    =INDEX({Row 2}, 1, MATCH("C", {Row 1}, 0)

    image.png


Answers

Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!

Trending in Formulas and Functions