+ Reply to Thread
Results 1 to 2 of 2

dynamic selection of cells

  1. #1
    Registered User
    Join Date
    02-08-2006
    Posts
    9

    dynamic selection of cells

    hi
    The below code shows an error in the second line . if give sheet1.Range("C10").select its working fine but i want to populate the i value from C1 to C100 cells.

    For i = 1To 110 Step 1
    Sheet1.Range(C(i)).Select
    varnbrows = Selection.CurrentRegion.Rows.count
    Selection.Value = i
    Next i

    thanks in advance

  2. #2
    Bob Phillips
    Guest

    Re: dynamic selection of cells

    Sheet1.Range("C" & i).Select


    --
    HTH

    Bob Phillips

    (remove nothere from email address if mailing direct)

    "parthaemail" <[email protected]>
    wrote in message
    news:[email protected]...
    >
    > hi
    > The below code shows an error in the second line . if give
    > sheet1.Range("C10").select its working fine but i want to populate the
    > i value from C1 to C100 cells.
    >
    > For i = 1To 110 Step 1
    > Sheet1.Range(C(i)).Select
    > varnbrows = Selection.CurrentRegion.Rows.count
    > Selection.Value = i
    > Next i
    >
    > thanks in advance
    >
    >
    > --
    > parthaemail
    > ------------------------------------------------------------------------
    > parthaemail's Profile:

    http://www.excelforum.com/member.php...o&userid=31311
    > View this thread: http://www.excelforum.com/showthread...hreadid=535899
    >




+ 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