+ Reply to Thread
Results 1 to 6 of 6

Automatic Geomean if date

  1. #1
    Registered User
    Join Date
    11-18-2012
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    5

    Automatic Geomean if date

    I have a table with dates (column A) and returns (column B). In cell A1, I have a specific year and would like to compute the geomean of the returns in column B that matches the criteria in cell A1 (year 2016). I was able to get a static geomean forrmula (=SUMPRODUCT(GEOMEAN(B3:B7+1))-1), but I am now looking for a formula that can return the new geomean everytime a new date that matches the criteria in cell A1 is entered in column A. For example, if data in A8 is 01.06.2017, the value should remain the same. But if value is 03.03.2016, the formula should add the value in B8. Basically, I am looking for a formula similar to average if, something similar to =AVERAGE(IF(YEAR(Change!A3:A10000)=Return!$A$3,Change!B3:B10000))


    A B C D
    1 2016
    2
    3 01.02.2016 (1.3%)
    4 01.03.2016 1.1%
    5 01.04.2016 0.5%
    6 01.05.2016 0.6%
    7 01.06.2016 (0.3%)
    8

  2. #2
    Forum Expert tim201110's Avatar
    Join Date
    10-23-2011
    Location
    Russia
    MS-Off Ver
    2016, 2019
    Posts
    2,357

    Re: Automatic Geomean if date

    Geomean do not calculate negative numbers
    Attached Files Attached Files

  3. #3
    Registered User
    Join Date
    11-18-2012
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    5

    Re: Automatic Geomean if date

    Hello Tim,

    Thank you for your help. I am trying to work with your formula. I used the below formula to compute mean return for a stock portfolio: =SUMPRODUCT(GEOMEAN(_t[return]+1))-1, using your spreadsheet. Trying now to make the automatic recalculation work. Let me know if you can work some magic 2.

  4. #4
    Forum Expert
    Join Date
    05-01-2014
    Location
    California, US
    MS-Off Ver
    Excel 2010
    Posts
    1,795

    Re: Automatic Geomean if date

    Quote Originally Posted by Herrmenan View Post
    I have a table with dates (column A) and returns (column B). In cell A1, I have a specific year and would like to compute the geomean of the returns in column B that matches the criteria in cell A1 (year 2016).
    Array-enter (press ctrl+shift+Enter instead of just Enter) the following formula:

    =GEOMEAN(IF(YEAR(A3:A1000)=A1,1+B3:B1000)) - 1

  5. #5
    Registered User
    Join Date
    05-13-2018
    Location
    Ulaanbaatar, Mongolia
    MS-Off Ver
    2010
    Posts
    3

    Re: Automatic Geomean if date

    Hi. I'm trying to find monthly geomean of the year 2008-2018 and dates are different. I found monthly arithmetic mean of returns by averageifs function by month, year criteria. however couldnt find geomean this way and any other way in these forum..It just calculates the mean of whole range. Is there any way to find geomean with year and month criteria?
    Thanks in advance for your help, I am learning so much about Excel through these forums.


  6. #6
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    30,851

    Re: Automatic Geomean if date

    Unfortunately your post does not comply with Rule 2 of our Forum RULES. Do not post a question in the thread of another member -- start your own thread.

    If you feel an existing thread is particularly relevant to your need, provide a link to the other thread in your new thread.

    Old threads are often only monitored by the original participants. New threads not only open you up to all possible participants again, they typically get faster response, too.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Equivalent to AVERAGEIF for GEOMEAN
    By BristolJGM in forum Excel General
    Replies: 13
    Last Post: 02-11-2023, 01:18 PM
  2. Geomean if cell contains letter
    By r3s1n in forum Excel General
    Replies: 2
    Last Post: 02-22-2017, 08:29 AM
  3. [SOLVED] Calculating the Median, Mean, and GeoMean of dynamic range
    By cameron.beyers in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-12-2012, 10:34 AM
  4. Calculating Geomean
    By dmw3293 in forum Excel General
    Replies: 7
    Last Post: 11-13-2011, 07:11 PM
  5. GEOMEAN Function
    By KD in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 01-28-2006, 05:10 AM
  6. Problem with GEOMEAN - returns #NUM error
    By Dan Knight in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 02-18-2005, 10:06 AM
  7. [SOLVED] Geomean range
    By Stephen in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 01-19-2005, 05:06 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