+ Reply to Thread
Results 1 to 7 of 7

How to raise power to a formula along column

Hybrid View

  1. #1
    Registered User
    Join Date
    03-06-2009
    Location
    Madison
    MS-Off Ver
    Excel 2003
    Posts
    2

    How to raise power to a formula along column

    Say I have a formula 2*1.1^1 in A1, but I want it to be 2*1.1^2 in A2, 2*1.1^3 in A3 and so forth. It seems simply drag it down the column wont work. How do I write a macro for this?

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: How to raise power to a formula along column

    Put this formula in row 1 and copy it down, it will do what you want:

    =2*1.1^ROW()
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: How to raise power to a formula along column

    I would advise ROWS over ROW()

    =2*1.1^ROWS(A$1:A1)

  4. #4
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: How to raise power to a formula along column

    Since you're determined to find improvement on every post I offer, at least on this one I'm interested in knowing why? Why is ROWS() better than ROW() in this application.

  5. #5
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: How to raise power to a formula along column

    JB, I only post if I feel they can be improved which in your case is rarely - if you don't think that it's worth me pointing out possible improvements that's your prerogative obviously.... personally I learn from people illustrating to me how my formulae can be improved or if another method may be deemed preferable... hopefully the OP will find them useful even if you don't.

    ROWS is not Volatile.... I *believe* ROW is (or was)... Regardless of Volatility ROWS is regarded as a more flexible approach in the long run as it will adapt as rows are inserted / removed without need for continual adjustment on the part of the user... eg if user inserts say a header row in row 1 ROWS will update accordingly (ROWS(A$1:A1) will become ROWS(A$2:A2) meaning resulting value will still generate correctly (ie row 2 to ^1 and A3 to ^2) whereas if ROW approach were used the user would have to remember that by adding rows they must revise their ROW formulae to incorporate the adjustment of -1 ... in A2: ROW() would generate to ^2 unless adjusted.

  6. #6
    Registered User
    Join Date
    03-06-2009
    Location
    Madison
    MS-Off Ver
    Excel 2003
    Posts
    2

    Re: How to raise power to a formula along column

    Thank you both of you

  7. #7
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: How to raise power to a formula along column

    Never knew any of that. Thanks for the input. I'll keep that in mind. Some things you do for so long it never occurs to you that it's a problem that can be avoided...like adding the -1 on Row(). I'll watch for ways to try it out.

    Thanks again.

    Iamsevenup, if that takes care of your need, be sure to EDIT your original post (Go Advanced) and mark the PREFIX box [SOLVED]

+ 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