+ Reply to Thread
Results 1 to 2 of 2

Loop formula through columns

  1. #1
    Registered User
    Join Date
    06-13-2014
    Posts
    1

    Loop formula through columns

    Hi!

    I am not very good at writing macros, but I have found that you can often make useful macros by googling and pasting code from the web. Now I have a task that I find difficult to solve and it would be great if someone could help me. I need to use a formula and loop it through about hundered colums on a sheet.

    Something like:

    CORREL(A2:A100;B2:B100) ..loop to.. CORREL(A2:A100;Q2:Q100)

    All the results from the correl-formulas should be inserted in a new column on another sheet.
    The problem I have is that I don't know how to loop through a set of columns in a formula. Any help would be very much appreciated!

  2. #2
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: Loop formula through columns

    This will loop through rows 2 to 100 and columns 1 to 43 and place a formula in each cell. variable x is the row count and variable i is the column count.

    Please Login or Register  to view this content.
    Hope that helps.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Loop Across Columns...If Blank Cell, Loop Down Rows
    By flindy87 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-25-2014, 07:05 PM
  2. Loop Across Columns If Blank Cell Loop Down Rows
    By flindy87 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-05-2014, 10:22 AM
  3. loop through columns in range and only copy columns that have value of 0
    By gherzberg in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 12-07-2012, 12:55 PM
  4. loop to resize formula across multiple columns
    By inwalkedbud in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-14-2008, 03:25 AM
  5. [SOLVED] Loop same formula for different columns?
    By JD in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-02-2006, 10:55 PM

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