Results 1 to 2 of 2

Increment the cell reference in an equation in Excel VBA

Threaded View

  1. #1
    Registered User
    Join Date
    02-24-2020
    Location
    Australia
    MS-Off Ver
    Excel 2016
    Posts
    5

    Increment the cell reference in an equation in Excel VBA

    I want to calculate the quadratic regression for a number of columns and display the results. I want to be able to increment ONLY the column referenece (Letter E) from linest equation and the row reference from .Range("B6:D6"). (Number 6 would increment and the columns would stay the same). The code I have so far is shown below. This works well just for column E and displays it in range B6:D6. I want to repeat this by looping through the columns (E to GT) in the linest formula and display the corresponding results in B[rownumber] : D[rownumber].

    
    Dim X
    X = Application.Evaluate("=LINEST('V Az or H El'!$A3:$A42,'V Az or H El'!$E3:$E42^{1,2})")
    Worksheets("Quadratic Regression").Range("B6:D6") = X
    How do I change the code to suit what I'm trying to do?
    Last edited by Sfern; 02-25-2020 at 06:18 PM.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. excel formula to perform a simple equation with increment columns
    By arrush in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 05-15-2019, 11:30 AM
  2. Cell reference increment other than 1
    By Nickolai in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 12-07-2014, 05:13 PM
  3. Increment cell reference
    By George.ca in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 03-22-2014, 11:18 PM
  4. Replies: 3
    Last Post: 11-28-2013, 10:41 AM
  5. [SOLVED] Increment Cell Reference
    By XLVBA in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-08-2012, 08:33 AM
  6. 'Tell' excel not to auto increment cell reference?
    By Foboman in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-08-2008, 11:02 AM
  7. A2 cell reference increment
    By cejones in forum Excel General
    Replies: 3
    Last Post: 11-07-2005, 11:45 PM

Tags for this Thread

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