+ Reply to Thread
Results 1 to 6 of 6

using x as cell number hard to explain

  1. #1
    Registered User
    Join Date
    11-06-2008
    Location
    nwe york
    Posts
    10

    using x as cell number hard to explain

    Hi,

    I want to have a variable as the cell number.

    I have C82, which shows a number, varying from 1-31, depending on the day of the month.

    I am calculating percent change from day to day. So on day 2, I want (Day 2 value minus Day 1 value, all divided by day 1 value)

    and on day 3, I want the calculation to be (day 3 value minues day 2 value divided by day 2 value) and so on for every day.


    I want the formula to be Dx-D(x-1)/D(x-1) with x equalling whatever value i put in for cell C82.


    so in C82, on November 2nd the value is 2 (for D2)

    the formula i want would compute:
    (Dx-D(x-1))/D(x-1) with x=2

    the next day i want it to input a 3 into C82, and have the formula give me:

    (Dx-D(x-1))/D(x-1) with x=3 which is (D3-D2)/D2

    Anyone understand what I am trying to do who can help???

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898
    Maybe I don't quite understand... but wouldn't it just be a matter of replacing the Dx with the cell reference, C82

    =(C82-(C82-1))/(C82-1)
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  3. #3
    Registered User
    Join Date
    11-06-2008
    Location
    nwe york
    Posts
    10
    no that's not it.

    I want the function to do =(D(C82)-(D(C82-1))/(D(C82-1))

    so when C82 is 18, i want the formula to do

    (D18-D17)/D17

    and when C82 is 28

    (D28-D27)/D27


    so I want the cell number in the function to vary as C82 varies.

  4. #4
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898
    Then perhaps:

    =(Indirect("D"&C82)-(Indirect("D"&C82)-1))/(Indirect("D"&C82)-1)

  5. #5
    Registered User
    Join Date
    11-06-2008
    Location
    nwe york
    Posts
    10
    that didnt seem to work either.

    i also want when i drag to autofill to the right, for it to change column.

    so the example i said was for column D

    i also want for Column E to have the same everything except an E replaces ever D

  6. #6
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898
    Quote Originally Posted by wkp2101 View Post
    that didnt seem to work either.

    i also want when i drag to autofill to the right, for it to change column.

    so the example i said was for column D

    i also want for Column E to have the same everything except an E replaces ever D
    hOW DIDN'T IT WORK?

+ 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