Identifyng one word or two in a field

I have a field which somtimes includes two words and I only need the first word.  I can use this to show only the first word:
Group1: Left$([Group],InStr(1,[Group]," ")-1)
But when I use it I get #ERROR for all of the fields that only have one word.  How do identify the field has one or two words so I can skip if it only has one word?

Thanks.
Scott PalmerData AnalystAsked:
Who is Participating?
 
Rey Obrero (Capricorn1)Connect With a Mentor Commented:


Group1: Left$([Group] & " ",InStr(1,[Group] & " "," ")-1)
0
 
Rey Obrero (Capricorn1)Commented:

try this

Group1: Left$([Group] & " ",InStr(1,[Group]," ")-1)
0
 
Scott PalmerData AnalystAuthor Commented:
Still getting #ERROR for the fields that have one word.
0
 
Scott PalmerData AnalystAuthor Commented:
That did it.  I was about to say that I am importing from an Excel spreadsheet so the space might have some sort of funny format.

Thanks.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.