Results 1 to 13 of 13

VBA - Trying to use For / Next Loop macro to go to next dynamic cell range in column 'C'

Threaded View

cheapkid1 VBA - Trying to use For /... 09-04-2012, 01:51 PM
JieJenn Re: VBA - Trying to use For /... 09-04-2012, 02:06 PM
cheapkid1 Re: VBA - Trying to use For /... 09-04-2012, 02:34 PM
JieJenn Re: VBA - Trying to use For /... 09-04-2012, 02:46 PM
cheapkid1 Re: VBA - Trying to use For /... 09-04-2012, 03:07 PM
Leith Ross Re: VBA - Trying to use For /... 09-04-2012, 04:23 PM
cheapkid1 Re: VBA - Trying to use For /... 09-05-2012, 09:15 AM
cheapkid1 Re: VBA - Trying to use For /... 09-14-2012, 11:39 AM
Leith Ross Re: VBA - Trying to use For /... 09-14-2012, 02:20 PM
cheapkid1 Re: VBA - Trying to use For /... 09-14-2012, 05:38 PM
cheapkid1 Re: VBA - Trying to use For /... 09-21-2012, 12:22 PM
cheapkid1 Re: VBA - Trying to use For /... 09-17-2012, 01:23 PM
cheapkid1 Re: VBA - Trying to use For /... 09-21-2012, 12:13 PM
  1. #2
    Forum Expert
    Join Date
    12-15-2009
    Location
    Chicago, IL
    MS-Off Ver
    Microsoft Office 365
    Posts
    3,177

    Re: VBA - Trying to use For / Next Loop macro to go to next dynamic cell range in column '

    At work. But I wrote something that is going to give you all the combinations. You can treat it as a template

    Sub Test()
    Dim i As Long, j As Long, LRi As Long, LRj As Long, x As Long
    
    LRi = Cells(Rows.Count, 1).End(xlUp).Row
    LRj = Cells(Rows.Count, 2).End(xlUp).Row
    x = 2
    
    For i = 2 To LRi
        For j = 2 To LRj
            Cells(x, 4) = Cells(i, 1)
            Cells(x, 5) = Cells(j, 2)
            x = x + 1
        Next j
    Next i
        
    End Sub
    Attached Files Attached Files

Thread Information

Users Browsing this Thread

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

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