+ Reply to Thread
Results 1 to 2 of 2

Loop to acces various rows

  1. #1
    Registered User
    Join Date
    04-12-2006
    Posts
    3

    Question Loop to acces various rows

    I want to do a loop like that (for example)

    i=1
    Total = 0

    Do While i<10
    Total = Total + Range(Gi).Value
    i=i+1
    Loop

    I know this isn't the right way to do it, but that is exactly why I'm asking you !

    How can I proceed to acces Range(G'i') to loop in many rows ?

    Thanks

    Frank

  2. #2
    Chip Pearson
    Guest

    Re: Loop to acces various rows

    Try something like

    i = 1
    total = 0

    Do While i < 10
    total = total + Range("G" & i).Value
    i = i + 1
    Loop



    --
    Cordially,
    Chip Pearson
    Microsoft MVP - Excel
    Pearson Software Consulting, LLC
    www.cpearson.com


    "Mhek" <[email protected]> wrote
    in message
    news:[email protected]...
    >
    > I want to do a loop like that (for example)
    >
    > i=1
    > Total = 0
    >
    > Do While i<10
    > Total = Total + Range(Gi).Value
    > i=i+1
    > Loop
    >
    > I know this isn't the right way to do it, but that is exactly
    > why I'm
    > asking you !
    >
    > How can I proceed to acces Range(G'i') to loop in many rows ?
    >
    > Thanks
    >
    > Frank
    >
    >
    > --
    > Mhek
    > ------------------------------------------------------------------------
    > Mhek's Profile:
    > http://www.excelforum.com/member.php...o&userid=33427
    > View this thread:
    > http://www.excelforum.com/showthread...hreadid=532439
    >




+ 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