+ Reply to Thread
Results 1 to 6 of 6

For Next Loop

  1. #1
    Registered User
    Join Date
    02-04-2009
    Location
    australia
    MS-Off Ver
    Excel 2003
    Posts
    16

    For Next Loop

    i am trying to do something along the lines of

    a For Next Loop that selects the cell N6 and inserts the formula
    $K$7*F6+$L$7
    then fill down to the cell N754
    then selects O6 and inserts the formula
    $K$8*F6+$L$8
    then fill down to cell O754
    repeating this until there are no more values in either the K or L column

    in the attatched spreadsheet i have deleted the values from 50 something down to 754 but the idea is still the same.

    so that each formula inserted keeps the cell from column K and L constant when filled down but F changes, then when the next column is used(ie. from column N to O), the next row in the K and L is used but F starts from F6 and changes as it is filled down again.

    any help would be amazing.
    Attached Files Attached Files
    Last edited by ~Lews Therin~; 02-05-2009 at 01:35 AM.

  2. #2
    Forum Expert Simon Lloyd's Avatar
    Join Date
    03-02-2004
    Location
    locked in the cage
    MS-Off Ver
    All the ones my homepage shows
    Posts
    3,161

    Re: For Next Loop

    I haven't looked at your workbook, but, if you dont want to use Excels Fill Down function manually then you can use this, it will fill down for as much data you have,
    Please Login or Register  to view this content.
    Not all forums are the same - seek and you shall find

  3. #3
    Registered User
    Join Date
    08-18-2008
    Location
    Manila
    MS-Off Ver
    Office 2003, Office 2007
    Posts
    26

    Re: For Next Loop

    Hi Kinslayer ,

    Here's a simple code that might help you.

    Please Login or Register  to view this content.
    Last edited by LordMarcus; 02-04-2009 at 04:30 AM.

    __________
    LordMarcus

  4. #4
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: For Next Loop

    Another method, by defining the range you can simply insert a formula across the entire range simultaneously

    Please Login or Register  to view this content.
    Last edited by DonkeyOte; 02-04-2009 at 04:40 AM.

  5. #5
    Registered User
    Join Date
    02-04-2009
    Location
    australia
    MS-Off Ver
    Excel 2003
    Posts
    16

    Re: For Next Loop

    ok thanks, that solved all my current little problems.

    lol nice references to WOT LordMarcus

    Lews.
    Last edited by Simon Lloyd; 02-05-2009 at 12:49 AM.

  6. #6
    Forum Expert Simon Lloyd's Avatar
    Join Date
    03-02-2004
    Location
    locked in the cage
    MS-Off Ver
    All the ones my homepage shows
    Posts
    3,161

    Re: For Next Loop

    Lews, if your initial problem has been solved, please mark your thread as Solved.

    How to mark a thread Solved
    Go to the first post
    Click edit
    Click Go Advanced
    Just below the word Title you will see a dropdown with the word No prefix.
    Change to Solved
    Click Save
    For your next question please start a new thread in the relevant forum, you may post a link to this thread if its relevant.
    Last edited by Simon Lloyd; 02-05-2009 at 12:50 AM.

+ 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