+ Reply to Thread
Results 1 to 5 of 5

Loop based on cell value

  1. #1
    Forum Contributor
    Join Date
    04-23-2009
    Location
    Dublin, Ireland
    MS-Off Ver
    Excel 2003 work, 2007 home
    Posts
    199

    Loop based on cell value

    Hi Guys

    Looking to get the below to work better. Instead of looping as long as there is something in the cells to the left I would like to loop the amount of times based on the value in cell A1- can anyone point me in the right direction please?

    i will have a many loops so would like this to be dynamic enough to work for each loop, the amount of times i need each to loop will not change

    Please Login or Register  to view this content.
    Last edited by somesoldiers; 10-04-2011 at 11:29 AM.

  2. #2
    Valued Forum Contributor quekbc's Avatar
    Join Date
    01-18-2010
    Location
    Sydney, Australia
    MS-Off Ver
    2010, 2013, 2016
    Posts
    1,149

    Re: Loop based on cell value

    Hi somesoldiers,

    What would the starting range be? I.e. where would ActiveCell in your macro code normally start from?

  3. #3
    Forum Contributor
    Join Date
    04-23-2009
    Location
    Dublin, Ireland
    MS-Off Ver
    Excel 2003 work, 2007 home
    Posts
    199

    Re: Loop based on cell value

    Starts at B2 I need it to loop a formula down 12 times (12 is the number in the cell I would like to reference), C2 another formula 12 times etc through K2- this is probably the least efficent way of doing this but I'm just under pressure to get something finished and that will do me for now

    thanks quekbc

  4. #4
    Valued Forum Contributor quekbc's Avatar
    Join Date
    01-18-2010
    Location
    Sydney, Australia
    MS-Off Ver
    2010, 2013, 2016
    Posts
    1,149

    Re: Loop based on cell value

    B2 looped down 12 times will go to L2. Not too sure if its a miscalculation but the code should look something like this.

    Please Login or Register  to view this content.

  5. #5
    Forum Contributor
    Join Date
    04-23-2009
    Location
    Dublin, Ireland
    MS-Off Ver
    Excel 2003 work, 2007 home
    Posts
    199

    Re: Loop based on cell value

    that'll do it, great thanks

+ Reply to Thread

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