INDEX/MATCH to enter a number based off a month name.

I'm trying to get an index match formula to enter the number of a quarter based of the month completed name between my working sheet and a helper sheet:

=IFERROR(INDEX({SourceMonthName}, MATCH(MONTH[Month Complete]@row), {SourceQuarterNUmber}, 0), "")

I keep getting #unparseable

Best Answer

Answers

  • KPH
    KPH ✭✭✭✭✭✭

    Hi @William Gray

    Try moving the parenthesis that closes the MATCH function

    From

    =IFERROR(INDEX({SourceMonthName}, MATCH(MONTH[Month Complete]@row), {SourceQuarterNUmber}, 0), "")

    To

    =IFERROR(INDEX({SourceMonthName}, MATCH(MONTH[Month Complete]@row, {SourceQuarterNUmber}, 0)), "")

    You might also need IFERROR around the MONTH function to return 0 if the cell is blank.

  • Still getting #unparseable

  • KPH
    KPH ✭✭✭✭✭✭

    Are your Month Complete and SourceMonthName columns date format? If doesn't sound like they are. If these are not dates, remove the MONTH function from the formula. You can match the text in the Month Complete with the text in SourceMonthName

    =IFERROR(INDEX({SourceMonthName}, MATCH([Month Complete]@row, {SourceQuarterNUmber}, 0)), "")

  • William Gray
    Answer ✓

    Thank you for your help. I swapped the sheet references around and it worked.

    =INDEX({SourceQuarterNumber}, MATCH([Month Complete]@row, {SourceMonthName}, 0))

  • KPH
    KPH ✭✭✭✭✭✭

    There we go! Glad I could help (a little).

Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!