Results 1 to 5 of 5

Cells reference not worknig in a loop

Threaded View

  1. #1
    Valued Forum Contributor luv2glyd's Avatar
    Join Date
    07-13-2008
    Location
    Seattle, WA, US
    MS-Off Ver
    Excel 2010
    Posts
    679

    Smile Cells reference not worknig in a loop

    I have the following loop that gives me an error:
                    For j = 3 To 5
                         'j = 3
                    _Data = Array("A", "B", "C", "D", "E") 
                    Sheets(j).Range(Cells(1, 10), Cells(1, 14)).Value = _Data
                    Next j
    However, if I turn the loop off and just set j=3, it outputs the data into the cells of the sheet that I currently have selected fine. What am I missing?

    Thanks
    Last edited by luv2glyd; 12-04-2015 at 01:22 PM.
    You either quit or become really good at it. There are no other choices.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Loop - Reference Cells Correctly?
    By Janc in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 02-13-2015, 09:36 AM
  2. [SOLVED] For Loop nested in For Each Loop - Use For Each's [item] as row reference
    By Schluensen in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-28-2014, 11:37 PM
  3. Changing my code to loop through a list of cells (lots of reference cells)
    By joshnathan in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 06-06-2014, 12:31 PM
  4. [SOLVED] A Loop does not loop throught. It stops after two cells.
    By AB33 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 09-14-2012, 01:14 PM
  5. Replies: 4
    Last Post: 07-13-2006, 01:15 PM
  6. Loop & Cell Reference
    By bforster1 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-29-2006, 05:55 PM
  7. reference 2 arrays in a For Loop
    By Bruce in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-10-2005, 04:05 AM

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