Results 1 to 9 of 9

Having problem with a nested FOR loop

Threaded View

  1. #1
    Forum Contributor
    Join Date
    12-30-2012
    Location
    Israel
    MS-Off Ver
    2007, 2016
    Posts
    642

    Having problem with a nested FOR loop

    Hi, I'm trying to run a nested loop, but receiving an error message. I'd much appreciate if somebody could "fix" this specific code .. By the way the aim is to fill up what I called "Ranking Table" in the sample.
    Sub find_ranking()
    Dim year As Range
    Set year = Sheets(1).Range("b2:b" & Sheets(1).UsedRange.Rows.Count)
    Dim one_year As Range, i As Integer
    For Each one_year In year
    For i = o To 10
    one_year.Offset(0, 14 + i) = Application.WorksheetFunction.Rank(one_year.Offset(0, 1 + i), year.resize(, i))
    Next i
    Next one_year
    End Sub
    Attached Files Attached Files
    Please * if you like the answer

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. VBA Nested For Loop
    By jbuckets in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 12-15-2012, 10:49 PM
  2. Nested Loop problem/Algorithm
    By Asad74 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-11-2012, 09:36 PM
  3. Next without For error in nested loop - Escaping a Nested Loop?
    By BeneRich in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-10-2012, 06:38 PM
  4. For each loop nested; getting stuck on one cell in first iteration of nested loop
    By Excel_vba in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 12-22-2009, 11:54 AM
  5. nested Loop
    By iturnrocks in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-21-2008, 07:26 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