+ Reply to Thread
Results 1 to 3 of 3

Offset Equations for Column

  1. #1
    Registered User
    Join Date
    10-12-2011
    Location
    Columbus, Ohio
    MS-Off Ver
    Excel 2003
    Posts
    4

    Offset Equations for Column

    Is there a way to include adding a series of equations to a worksheet in VBA for a range of cells that will change from day to day. The equation is simple, just =O2-M2 and then dragged down the list, so O3-M3, Etc. However how many cells will be in the column will change from day to day. I currently have it set out to about 100 more cells than we have had as a recent max, but I would definately prefer for it to simply take into account how many cells there actually are in the adjoining row.

    Thanks for any help that you guys might come up with. I did include the code below, I know it is a little garbled, duct taped it together from the macro recorder.

    Please Login or Register  to view this content.

  2. #2
    Forum Expert p24leclerc's Avatar
    Join Date
    07-05-2010
    Location
    Québec
    MS-Off Ver
    Excel 2021
    Posts
    2,081

    Re: Offset Equations for Column

    Why don't you use pre-programmed functionnality of Excel like the one which copy a cell containing a formula down the column. You double click on the lower right corner of your cell containing your formula and it will be copied down its column till there are data on either side of this column.

  3. #3
    Forum Contributor JP Romano's Avatar
    Join Date
    10-09-2008
    Location
    Princeton, NJ
    MS-Off Ver
    2010
    Posts
    500

    Re: Offset Equations for Column

    You could try something like
    Please Login or Register  to view this content.

+ 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