Results 1 to 9 of 9

How To Loop a copy range macro until lookup cell is blank/empty

Threaded View

  1. #1
    Registered User
    Join Date
    07-12-2013
    Location
    toronto, canada
    MS-Off Ver
    Excel 2007 & MAC excel 2011
    Posts
    51

    How To Loop a copy range macro until lookup cell is blank/empty

    Hello, I have a 2 Macros that looks to see if a cell (i2) has info and if it does, it copies a range 057:AX57 to O2 when I click a button, which works, now what I would like to do it the macro then looks at i3, i4... and then copies the same range but next row down (O3) and loops until it hits a blank cell in "i", below is my current code, just not sure how to make it loop.


    Private Sub ButtonClick()
    try1
    End Sub
    'standard module code
    sub try1
    If(IsBlank(I2)=false then
    CopyRange 
    else 
    exit sub 
    End If
    end sub
    
    ---------------------------------------------------------------
    
    Sub CopyRange()
    Range("o57:ax57").Copy Destination:=Range("o2")
    Application.CutCopyMode = False
    End Sub
    Any assistance would be greatly appreciated.
    Last edited by iggypop; 11-01-2017 at 09:40 AM.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Loop copy cell of range to 1 cell, and so on till cell empty
    By countryfan_nt in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 02-16-2017, 02:33 AM
  2. Replies: 3
    Last Post: 01-09-2017, 05:22 PM
  3. VBA macro to copy last non blank cell on a certain range that has formula
    By danwoltrs in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-08-2016, 03:58 PM
  4. [SOLVED] How to copy into next empty row using "for each cell in range" loop
    By GIS2013 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-23-2013, 02:30 PM
  5. [SOLVED] Excel VBA macro to select range separated by blank row and copy to next empty column
    By hackini in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 01-29-2013, 02:13 AM
  6. [SOLVED] Returning a blank cell if the lookup value is empty
    By mgmerv in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 11-02-2012, 06:59 AM
  7. Macro Copy Active Cell to Range Name, loop
    By zigstick in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 04-27-2005, 03:06 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