+ Reply to Thread
Results 1 to 3 of 3

Loop to change Range that goes into mail body etc. when condition is met.

  1. #1
    Forum Contributor ANDREAAS's Avatar
    Join Date
    05-06-2013
    Location
    Port Elizabeth, South Africa
    MS-Off Ver
    Excel 2007 / 2010
    Posts
    368

    Loop to change Range that goes into mail body etc. when condition is met.

    Good Day All

    I have some code from @RonDeBruin that is adapted to work for my specific purposes, however i do not know how to make it loop through the rows and increment the ranges each time the criteria is met.

    Unfortunately my file is too big to upload,but here is the details and the code.

    The criteria is "YES" in Column O
    So, each time "Yes" is found in Column O, The highlighted sections in the code needs to increment to the row number corresponding where the "YES" was found.
    Each time "Yes" is found needs to produce a new mail.

    i.e if "Yes" Is found in Row7 then this
    Please Login or Register  to view this content.
    must change to this
    Please Login or Register  to view this content.
    Please Login or Register  to view this content.
    Thanks in advance for any help.
    Last edited by ANDREAAS; 06-13-2020 at 04:01 AM. Reason: better descriptive title
    A great big thank you to all the experts on the forum that are always so friendly and helpful.

    You guys Rock!!!!

  2. #2
    Forum Contributor ANDREAAS's Avatar
    Join Date
    05-06-2013
    Location
    Port Elizabeth, South Africa
    MS-Off Ver
    Excel 2007 / 2010
    Posts
    368

    Re: Loop to change Range that goes into mail body etc. when condition is met.

    Hi

    So i found a solution that goes as far as displaying or sending a mail in this way, but the code just keeps on running without end.

    Any ideas?

    Please Login or Register  to view this content.

  3. #3
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,122

    Re: Loop to change Range that goes into mail body etc. when condition is met.

    Solution to this within this thread here
    Good Luck
    I don't presume to know what I am doing, however, just like you, I too started somewhere...
    One-day, One-problem at a time!!!
    If you feel I have helped, please click on the star to left of post [Add Reputation]
    Also....add a comment if you like!!!!
    And remember...Mark Thread as Solved.
    Excel Forum Rocks!!!

+ 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] Find range of text, parse and copy (for..each?) rows until next range found
    By purgamentum in forum Excel Programming / VBA / Macros
    Replies: 33
    Last Post: 05-07-2020, 09:43 PM
  2. Replies: 3
    Last Post: 01-04-2020, 09:46 AM
  3. [SOLVED] Find and Replace Loop that looks up values in range for Search criteria
    By lougs7 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 09-06-2018, 04:31 PM
  4. Replies: 10
    Last Post: 11-04-2015, 05:19 AM
  5. Replies: 4
    Last Post: 04-03-2014, 12:19 AM
  6. Replies: 2
    Last Post: 10-23-2012, 11:09 AM
  7. Loop to find a criteria within range, then output results to individual lines
    By bologne in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 08-17-2011, 12:30 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