+ Reply to Thread
Results 1 to 2 of 2

Range Parameters

  1. #1
    Bertrand
    Guest

    Range Parameters

    XL2002
    In a For ...If loop I want the range to change according to the value of
    the loop, but how?

    For example

    For cy = 1 to 70
    Range("E cy") = 'something'
    Next cy

    In other words :- put 'something' in E1 and then E2 etc. up to E70

    How do I get the "text" in the Range instruction to change with each
    variation of *cy*?



    [hope I've explained this OK]

    Many Thanks
    Bertrand



  2. #2
    Norman Jones
    Guest

    Re: Range Parameters

    Hi Bertand,

    Perhaps, try something like:

    '=============>>
    Public Sub Tester()
    Dim cy As Long

    For cy = 1 To 70
    Range("E" & cy) = "ABC" & cy
    Next cy

    End Sub
    '<<=============


    ---
    Regards,
    Norman


    "Bertrand" <[email protected]> wrote in message
    news:[email protected]...
    > XL2002
    > In a For ...If loop I want the range to change according to the value of
    > the loop, but how?
    >
    > For example
    >
    > For cy = 1 to 70
    > Range("E cy") = 'something'
    > Next cy
    >
    > In other words :- put 'something' in E1 and then E2 etc. up to E70
    >
    > How do I get the "text" in the Range instruction to change with each
    > variation of *cy*?
    >
    >
    >
    > [hope I've explained this OK]
    >
    > Many Thanks
    > Bertrand
    >
    >




+ 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