Eljefegeneo
Still trying to learn
- Local time
- Today, 11:33
- Joined
- Jan 10, 2011
- Messages
- 904
I want to compare two large lists where the Organization name is the same. Unfortunately the names may not be exactly the same thus I am attempting to parse the first word in each list against the other.
Thus I thought if I could get the first word in a string that I could at least determine if there was any similarities in the two lists when checking for duplicates.
The only problem is that some strings only have one word and this results in a #Func! Error. I have tried the following in my query:
All of which give me the #Func! Error.
Then I tried the following which gave a blank when there was only one word.
Thus I thought if I could get the first word in a string that I could at least determine if there was any similarities in the two lists when checking for duplicates.
The only problem is that some strings only have one word and this results in a #Func! Error. I have tried the following in my query:
Code:
Org: Left([tblMain.Organization],InStr([tblMain.Organization]," ")-1)
Org1: IIf(Len([Organization])>0,(Left([Organization],InStr([Organization]," ")-1)),"")
Org2: Nz(IIf(Len([Organization])>0,(Left([Organization],InStr([Organization]," ")-1)),""),"")
All of which give me the #Func! Error.
Then I tried the following which gave a blank when there was only one word.
Code:
Org4: Left([Organization],InStr([Organization]," "))