Logo 
Search:

MS Office Answers

Ask Question   UnAnswered
Home » Forum » MS Office       RSS Feeds
  Question Asked By: Vivek Patel   on Oct 21 In MS Office Category.

  
Question Answered By: Nina Garcia   on Oct 21

i dont know what is going on with your code, but i think using function like len
and mid may be easier. for example, you can loop this, but the logic would be

characternumber = len(cells.value) --this counts the number of characters in
your domain
for (row 1 to end)
characternumber = 0
counter = 0
for i = 1 to characternumber
if left(cell.value,i)=@
counter = counter  +1 (counter should be set to 0 at the beginning of
each row  loop)
exit for
else: counter = counter +1
end if
next
cells(1,2).value = mid(cell.value,counter,characternumber - counter) (i don't
know if the beginning of this code is correct, but what i'm trying to do is put
the domain  name in the cell to the right of the current one)
next

the mid may be off by one character  on either the first or second integer
numbers, which you can fix by adding a +1. you'll just need to experiment.

Share: 

 

This Question has 2 more answer(s). View Complete Question Thread

 
Didn't find what you were looking for? Find more on Extracting domains from a list of email addresses Or get search suggestion and latest updates.


Tagged: