Results 1 to 10 of 10

Help With Looping Macro

Threaded View

  1. #1
    Registered User
    Join Date
    05-16-2017
    Location
    New Jersey
    MS-Off Ver
    2010
    Posts
    51

    Exclamation Help With Looping Macro

    How could I make the below VBA loop until a blank cell?

    Dim rCell As Range
    Set rCell = Range("B7")
    Dim sDesc As Range
    Set sDesc = Range("C7:O7")
    Dim sDiv As Range
    Set sDiv = Range("P7:X7")
    Dim dEnd As Range
    Set dEnd = Range("Y7:AA7")
    
    
    
       If Not IsEmpty(rCell) Then
            For Each rCell In sDesc
                If IsEmpty(rCell) Then
                    Msg = MsgBox("Please Fill In Blank Cell " & rCell.Address & " Before Saving")
                    Cancel = True
                End If
            Next
            If WorksheetFunction.CountA(sDiv) = 0 Then
                Msg = MsgBox("Please Fill In a Division For Cells Between sDiv")
                Cancel = True
            End If
            For Each rCell In dEnd
                If IsEmpty(rCell) Then
                    Msg = MsgBox("Please Fill In Blank Cell " & rCell.Address & " Before Saving")
                    Cancel = True
                End If
            Next
          End If
    Moderator's note: Please take the time to review our rules. There aren't many, and they are all important. Rule #3 requires code tags. I have added them for you this time because you are a new member. --6StringJazzer
    Last edited by lsantana; 07-28-2018 at 06:41 PM.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Macro to create a looping macro to populate another worksheet.
    By sungen99 in forum Excel Programming / VBA / Macros
    Replies: 23
    Last Post: 06-22-2016, 10:53 AM
  2. Help with looping my macro
    By dry in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-03-2015, 11:19 AM
  3. Looping Macro
    By ashar in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-20-2013, 07:50 PM
  4. [SOLVED] Help with looping a macro
    By jumpingoff in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-27-2012, 04:15 PM
  5. Looping Macro
    By ExcelGuy160 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 09-14-2010, 06:37 PM
  6. Looping macro
    By mbenazeraf in forum Excel General
    Replies: 13
    Last Post: 01-18-2010, 02:20 PM
  7. Looping a macro
    By Toadums in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 01-31-2008, 01:07 PM

Tags for this Thread

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