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.

IF Row @ Column A=Column B, then return Column C

I have 2 sheets.

Sheet A to track the orders: Order IDs (column 1) and the Services (column 2) of those Order IDs.

Sheet B to track the hours works on the orders: Order IDs (column X) and the Services (column Z) of those Order IDs.

I am trying to use a formula that says:

If Sheet A Order ID@row equals Order ID@column A on Sheet B , then return the matching Service from Sheet B column 2.

I have tried:

=IF(MATCH ({Orders Range 1}, [Order ID #]@row), {Orders Range 2}, 0)

=INDEX({Orders Range 1}, MATCH([Order ID #]@row, {Orders Range 2}, 0))

I appreciate the help!

Tags:

Best Answers

  • ✭✭✭✭✭
    Answer ✓

    Try

    =INDEX({SheetBServices}, MATCH([SheetA Order ID]@row, {SheetB Order ID}, 0))

    Basically, the index function you already tried looks correct EXCEPT you want to index through your services column not your orders column and you want to match your orders column in sheet b, not your services - you just got those two columns reversed.

  • Answer ✓

    This was the winner!

    =INDEX({SheetBServices}, MATCH([SheetA Order ID]@row, {SheetB Order ID}, 0))

    Thank you all for your quick responses. I greatly appreciate the help!

Answers

  • ✭✭✭✭✭
    Answer ✓

    Try

    =INDEX({SheetBServices}, MATCH([SheetA Order ID]@row, {SheetB Order ID}, 0))

    Basically, the index function you already tried looks correct EXCEPT you want to index through your services column not your orders column and you want to match your orders column in sheet b, not your services - you just got those two columns reversed.

  • ✭✭✭✭
    edited 02/21/25

    Change your 0 to 1 or eliminate it completely

    =INDEX({Orders Range 1}, MATCH([Order ID #]@row, {Orders Range 2}, 1)) or

    =INDEX({Orders Range 1}, MATCH([Order ID #]@row, {Orders Range 2}))

  • Answer ✓

    This was the winner!

    =INDEX({SheetBServices}, MATCH([SheetA Order ID]@row, {SheetB Order ID}, 0))

    Thank you all for your quick responses. I greatly appreciate the help!

  • ✭✭✭✭✭

    Glad it worked for you!

Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!

Trending in Formulas and Functions