+ Reply to Thread
Results 1 to 4 of 4

"Moving" Macro

  1. #1
    Forum Contributor
    Join Date
    06-18-2015
    Location
    Milton Keynes
    MS-Off Ver
    2016
    Posts
    101

    "Moving" Macro

    Hi Guys,

    Not sure if this would be something that works, but wanted to sound it out.

    Say for example I had a list of 10 numbers in column A.

    In column B I have a list of 10 e-mail addresses.

    For the sake of this, say I know how to get excel to e-mail Address B1 with detail A1.

    Would there be a way to programme a macro that would repeat this for each line in A1, either until there is no more information or for a set length (10 rows)?

    Basically I want to be able to have a macro that would repeat for each line in a sheet.

  2. #2
    Valued Forum Contributor
    Join Date
    03-24-2014
    Location
    England
    MS-Off Ver
    Excel 2003 - 2016
    Posts
    575

    Re: "Moving" Macro

    Yes.

    A lot depends on your email client, ie the code for sending emails via Lotus Notes will be different to sending via Outlook. Assuming it's Outlook you're using have a look at: http://www.rondebruin.nl/win/s1/outlook/mail.htm

  3. #3
    Forum Contributor
    Join Date
    06-18-2015
    Location
    Milton Keynes
    MS-Off Ver
    2016
    Posts
    101

    Re: "Moving" Macro

    Hi Bellygas,

    I know how to e-mail it out.

    I'm just not sure on how to get a macro to repeat for each different line.

  4. #4
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: "Moving" Macro

    You loop through each column B cells and use that cell as e-mail address. You can also add column A for anything else.

    So,

    For each cel in range("B1:B" & range("B"&rows.count).end(xlup).row)
    cc: cel

    next

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Excel 2010 -- "Visual Basic" "Macros" and "Record Macro" all disabled.
    By NicholasL in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 05-07-2017, 06:11 AM
  2. [SOLVED] Excel 2013 - VB 7.1 - Macro for moving "one cell" down reports System Error & H80010108
    By astra in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-21-2016, 08:05 AM
  3. Moving articles "the" and "a" (and foreign equivalents)
    By j_christley in forum Excel General
    Replies: 2
    Last Post: 04-18-2015, 02:04 PM
  4. Replies: 4
    Last Post: 11-17-2013, 12:05 PM
  5. How can i copy value from "HTMLText"(EMBED("Forms.HTML:Text","")),using Macro
    By andrewyang in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-18-2010, 12:47 AM
  6. Macro: "Moving Column" Graph
    By blk2051 in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 04-03-2009, 09:09 AM
  7. moving the formula "average" over one column in a macro
    By drumstu in forum Excel Formulas & Functions
    Replies: 22
    Last Post: 09-06-2005, 09:05 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1