Blank cell stops Marco
Blank cell stops Marco
Thanks Thanks:  0
Likes Likes:  0
Results 1 to 2 of 2

Thread: Blank cell stops Marco

  1. #1
    New Member
    Join Date
    Apr 2002
    Posts
    14
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

     
    I am trying to set up my macro so that if say cell b5 is blank my macro will stop, and if it is possible without giving the person running the marco a notification (I already have the screen.update=false set up)

    Thanks, Bill

  2. #2
    MrExcel MVP Al Chara's Avatar
    Join Date
    Feb 2002
    Location
    Newark, Delaware
    Posts
    1,701
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

      
    Try the following:
    Code:
    Sub YourMacro()
    For Each Cell In ActiveSheet.UsedRange
    If Cell.Address = "$B" And Cell.Value = "" Then GoTo 1
    Next
    1 End Sub
    Edit as needed, but this code will loop through all active cells until it gets to B5 and if B5 is empty.
    Best regards,
    Allan Chara
    http://www.mrspreadsheets.com

User Tag List

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

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

 

 
DMCA.com