View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.misc
Toppers
 
Posts: n/a
Default Macro to find text string in a column and paste data in anothe

See my reply.

"nicolascap" wrote:


Okay I understand your concern but there is not virus in the file.

Thanks for your answer, it works fine!

Assuming that I would get some code as a response, I may have
simplified my problem too much though.

There is actually more than one "Column 1 containing either nothing,
"To", or "Cc" as email destination fields". This is because my final
goal is to create email distribution lists selectively. Lets say that
each of these columns containing target email destination fields("To" ,
"Cc" or nothing) represent a group of people to be emailed as main
recipient or Cc. Therefore a single person can be "To" and in the next
Column can be "Cc".

That's why I want to have a button under each of these columns so I'll
only need to change the range in which the macro is looking for "To" or
"Cc", and make as much adapted macros as there are columns. The second
step for this macro being to feed the "to" and "Cc" columns
appropriately.

This is with the goal of using a second macro behind this to take the
email adresses in the "to" columns and put them in the "to" field of an
email.

Hope I am clear enough.

So can this be done in a macro like:

For i=1 to n
Search for "To" in column 1

If "to" is found then paste corresponding email adress to Column 3
"To"
If "Cc" is found then paste corresponding email adress to Column 4
"Cc"

thanks for your time

nicolas


--
nicolascap
------------------------------------------------------------------------
nicolascap's Profile: http://www.excelforum.com/member.php...o&userid=32044
View this thread: http://www.excelforum.com/showthread...hreadid=522138