+ Reply to Thread
Results 1 to 3 of 3

For next loop for range names

Hybrid View

  1. #1
    Registered User
    Join Date
    10-19-2010
    Location
    Chennai, Tamilnadu
    MS-Off Ver
    Excel 2003
    Posts
    15

    For next loop for range names

    Hi all,

    I have macro like below

    Sub Match_fft()
    Dim a As Range
    
    Set a = ActiveSheet.Range("FFT1")
    ' i have to do some computation
    
    Set a = ActiveSheet.Range("FFT2")
    ' i have to do some computation SAME AS ABOVE
    
    Set a = ActiveSheet.Range("FFT3")
    ' i have to do some computation SAME AS ABOVE
    
    Set a = ActiveSheet.Range("FFT4")
    ' i have to do some computation SAME AS ABOVE
    
    End sub
    is it possible to use "for next" loop to calculate from FFT1 to FFT4?


    Thanks in advance
    Last edited by tamilvendhan; 01-31-2012 at 12:40 AM.

  2. #2
    Forum Expert
    Join Date
    01-15-2007
    Location
    Brisbane, Australia
    MS-Off Ver
    2007
    Posts
    6,591

    Re: For next loop for range names

    Hi

    for i = 1 to 4
    set a = activesheet.range("FFT" & i)
    next i
    rylo
    Last edited by rylo; 01-31-2012 at 12:18 AM. Reason: typo

  3. #3
    Registered User
    Join Date
    10-19-2010
    Location
    Chennai, Tamilnadu
    MS-Off Ver
    Excel 2003
    Posts
    15

    Re: For next loop for range names

    Thanks a lot for QUICK REPLY

+ 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