# How to Match Regions to States in a Column

Options

I am creating a sheet that needs to identify the "region" based on the "state" in the preceding column. I've tried multiple formulas and get back an error message (unparseable). What am I missing?

=IF([State]1=ny,nj,ct, "northeast",IF([State]1=nc,sc,ga, "southeast", IF([State]1=ca, az, nv, "west")))

Options

@Genevieve P Boom! That did it! Thanks so much for your help Genevieve

• ✭✭✭✭✭✭
Options

Hi Donna,

You're getting an #UNPARSEABLE error because you've entered text without quotes, shown in bold

=IF([State]1=ny,nj,ct, "northeast",IF([State]1=nc,sc,ga, "southeast", IF([State]1=ca, az, nv, "west")))

Putting those strings of text within quotes would make your formula run, but it would not work correctly because the formula will only return an exact match. If you put NY in the State column it won't display northeast because the formula is looking for an exact match of nj,nj,ct.

You need to rewrite the formula to look for the individual states, this is the formula that does that:

=IF(OR(State@row = "NY", State@row = "NJ", State@row = "CT"), "Northeast", IF(OR(State@row = "NC", State@row = "SC", State@row = "GA"), "Southeast", IF(OR(State@row = "CA", State@row = "AZ", State@row = "NV"), "West")))

You can see it here

👨🏼💻 Dan Palenchar | School of Sheets Solutions Consulting | Smartsheet Aligned Gold Partner

If this helped, help me & the SSC by accepting it and reacting w/💡insightful, ⬆️ Vote Up, and/or ❤️Awesome.

PS - If you have a follow up response use @Dan Palenchar so I get notified of your reply!

• Options

Thank you!!!

• Options

Follow up - I've entered all 50 states and their respective regions following the above formula. I'm getting an "incorrect argument" message. Can you tell me how to address this?

• ✭✭✭✭✭✭
Options

To add to Dan's excellent suggestion.

Another option and the one I'd recommend would be to use a VLOOKUP or a combination of INDEX/MATCH instead and place the table in a separate sheet or the same in some hidden columns.

What do you think?

Would that work/help?

I hope that helps!

Be safe and have a fantastic week!

Best,

Andrée Starå | Workflow Consultant / CEO @ WORK BOLD

SMARTSHEET EXPERT CONSULTANT & PARTNER

Andrée Starå | Workflow Consultant / CEO @ WORK BOLD

W: www.workbold.com | E:andree@workbold.com | P: +46 (0) - 72 - 510 99 35

Feel free to contact me for help with Smartsheet, integrations, general workflow advice, or anything else.

• Options

Thanks for the prompt reply, Andree and I appreciate your suggestion, but I'm brand new to SS and I don't have the luxury to start again (and I don't know how to work in VLookup). The formula provided is very workable, I just feel like either there are not enough (or too many) parentheses at the end of the formula or there are spaces where there shouldn't be...are you able to see where I've gone wrong here?

• ✭✭✭✭✭✭
Options

Happy to help!

I'd be happy to take a quick look.

Can you maybe share the sheet(s)/copies of the sheet(s)? (Delete/replace any confidential/sensitive information before sharing) That would make it easier to help. (share too, andree@getdone.se)

SMARTSHEET EXPERT CONSULTANT & PARTNER

Andrée Starå | Workflow Consultant / CEO @ WORK BOLD

W: www.workbold.com | E:andree@workbold.com | P: +46 (0) - 72 - 510 99 35

Feel free to contact me for help with Smartsheet, integrations, general workflow advice, or anything else.

Options

I haven't been able to write out your formula and test, but you'll want to make sure that you close off every OR statement before listing what the IF should return.

It looks like your first OR statement closes too early, there's a pink ) after "NH" instead of after "RI".

Then, none of the other OR statements have any closing parentheses before the value you want as a result.

Ex:

You should have a closing ) and comma after "DC", before "Midatlantic", like so: "DC"), "Midatlantic", IF(OR(... etc

Then again after "MS"), "Southeast"

Does that make sense? You have to tell the OR when to stop for each of your results.

Hope that helps!

Genevieve

• Options

Shared

• Options

Got it! Thanks very much

• Options

@Genevieve P I cleaned up a few of the items that you pointed out, it then reverted to #unparseable :-(

Options

Hi Donna,

Try removing some of the end )))'s from the very last bit of the formula. See how some of them are black instead of a colour? The )s change colour depending on what they're matching with. You only need up until the last BLUE one, as that's matching with the very first open ( which is blue, at the beginning of the formula.

Options

@Genevieve P Boom! That did it! Thanks so much for your help Genevieve