Update Query

Petros

Registered User.
Local time
Today, 05:07
Joined
Jun 30, 2010
Messages
145
HI all,

Not sure how this procedure is called in english, however, i will try my best to explain..

Field A: Text field that contains email addresses
Example: a.a@google.com

I want to update field B (text) with everything after the @ symbol in Field A, i.e google.com..how do i extract/separate the text after the @ symbol in this case?

Thanks!
 
THank you vbaInet,

i tried the MID function and in my specific case it would not get the job done since it depends on a starting position for the string. In my case this is a variable since i want to try to extract everything after the specific symbol @..only the domain

or did i misunderstsand the function?

Thanks!
 
You use instr()+1 to locate the startposition of the next character in the string after @.

The Mid(string,start,stop) function takes the the result of instr() in the 2. parameter and since you don't give a stop parameter it will give you the rest of the string.

Putting it all together:

Mid(String, Instr(String, "@")+1))

JR
 
Thanks JANR..

i got it..i am dumb. It is the combincation of the two functions..instr() identifies and Mid returns the string result..

This is very much appriciated by both of you two..thanks!
 
No problem, use the site VbaInet gave you to understand string manipulation functions they are useful. Happy coding

JR
 
No problem, use the site VbaInet gave you to understand string manipulation functions they are useful. Happy coding

JR
... and bookmark it too. Happy developing!
 

Users who are viewing this thread

Back
Top Bottom