+ Reply to Thread
Results 1 to 3 of 3

Thread: Return usable Cell Address

  1. #1
    Registered User
    Join Date
    12-20-2011
    Location
    Ohio
    MS-Off Ver
    Excel 2007
    Posts
    2

    Return usable Cell Address

    Column A is the year. Column B is the corresponding interest rate for that year. This Data runs from A4:B35. In column N is a particular start year, and column O is a particular end year. What I need in Column P is the average between from the year in N to the year in O, which I want to be pulled from A4:B35.

    Example
    A B N O P
    1980 5.0 1981 1982 Need average from B2:B3 here
    1981 6.0 1980 1982 Need average from B1:B3 here
    1982 5.5 1982 198x Need average from B3:Bx here

    The columns in between these will be user entered. Then the spreadsheet will pull column N and O from what was user entered. So I need the formula in column P to be able to pull the average from any possible range of years that are available in A4:A35. So I need to be able to average A6:A8, A10:A20, A4:A30, etc. I've been able to get a cell address using an array formula, but that does me no good because the address cannot be used within another forumla.

    If it matters, this will be averaged for the total year, i.e. 5.0%*365 days + 6.0%*365 days, etc. As always, this things make plenty of sense in my head, but may be confusing. Let me know if you need more information.

    I apologize but I cannot post the file. I will work on creating a similar copy in case its needed.

  2. #2
    Valued Forum Contributor tigeravatar's Avatar
    Join Date
    03-25-2011
    Location
    USA
    MS-Off Ver
    Excel 2003 - 2007
    Posts
    2,342

    Re: Return usable Cell Address

    Copus1221,

    Welcome to the forum!

    I see you have Excel 2007 listed as your version, so the formula you're looking for is the AverageIfs() formula.

    In cell P4:
    =AVERAGEIFS($B$4:$B$35,$A$4:$A$35,">="&N4,$A$4:$A$35,"<="&O4)

    And then copy down. Is that something you can work with?
    Hope that helps,
    ~tigeravatar

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  3. #3
    Registered User
    Join Date
    12-20-2011
    Location
    Ohio
    MS-Off Ver
    Excel 2007
    Posts
    2

    Re: Return usable Cell Address

    So far so good. Thanks for your quick response! I will let you know if I run into any issues.

    And thanks for the welcome!

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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.2.0