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

  • I have a pretty basic sheet that I am using to develop a formula, and am encountering an issue I haven't seen before. The formula isn't including my second row for some reason. It isn't a huge issue f…
    User: "jjg279"
    Answered ✓
    9
    2
  • I'm sure that this is an easy fix but I've tried a bunch of different ways and can't get this to work. I need to get the max date from a sheet to feed it into my meta data sheet (dates are stored in d…
    User: "susanmgfin"
    Answered ✓
    8
    2
  • I need help to come up with the risk formula. I tried many different formulas and tried to modify it but just can't seem to have desired results. So these are the conditions I MUST meet: Program is a …
    User: "Ronak"
    Answered ✓
    29
    6