GEOMEAN IF for specific date range

vbaisdaxing

New Member
Joined
Aug 23, 2017
Messages
12
[TABLE="width: 500"]
<tbody>[TR]
[TD]date[/TD]
[TD]amt[/TD]
[/TR]
[TR]
[TD]1/1/02[/TD]
[TD]2[/TD]
[/TR]
[TR]
[TD]1/1/03[/TD]
[TD]6[/TD]
[/TR]
[TR]
[TD]1/1/05[/TD]
[TD]4[/TD]
[/TR]
[TR]
[TD]1/1/10[/TD]
[TD]7[/TD]
[/TR]
[TR]
[TD]1/1/11[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]1/1/13[/TD]
[TD]2[/TD]
[/TR]
[TR]
[TD]1/1/15[/TD]
[TD]5[/TD]
[/TR]
[TR]
[TD]1/1/17[/TD]
[TD]7
[/TD]
[/TR]
</tbody>[/TABLE]

Hello,

I was wondering if it is possible to utilize a geomean function based on a specific date selection? For example, the data that is located within 1/1/10 - 1/1/13. Any thoughts or suggestions would be greatly appreciated.

thank you in advance.
 

Excel Facts

Move date out one month or year
Use =EDATE(A2,1) for one month later. Use EDATE(A2,12) for one year later.
Array-enter (press ctrl+shift+Enter instead of just Enter) a formula of the following form:

=GEOMEAN(IF(A2:A9 >= DATE(2010,1,1), IF(A2:A9 <= DATE(2013,1,1), B2:B9)))
 
Last edited:
Upvote 0
thank you joeu2004. Greatly appreciated. I thought i could figure it out with the how you set up the formula. but i was wondering how would you write the formula if you had a name column added. For example all entries with the name=A and the date range of 1/1/10 - 1/1/13 ? Thank you very much once again. I earlier tried
"=GEOMEAN(IF(AND(A2:A9 >= DATE(2010,1,1),B2:B9 = "A"), IF(AND(A2:A9 <= DATE(2013,1,1),B2:B9="A"), C2:C9)))"

[TABLE="width: 500"]
<tbody>[TR]
[TD]date[/TD]
[TD]name[/TD]
[TD]amt[/TD]
[/TR]
[TR]
[TD]1/1/02[/TD]
[TD]a[/TD]
[TD]2[/TD]
[/TR]
[TR]
[TD]1/1/03[/TD]
[TD]b[/TD]
[TD]6[/TD]
[/TR]
[TR]
[TD]1/1/05[/TD]
[TD]a[/TD]
[TD]4[/TD]
[/TR]
[TR]
[TD]1/1/10[/TD]
[TD]b[/TD]
[TD]7[/TD]
[/TR]
[TR]
[TD]1/1/11[/TD]
[TD]a[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]1/1/13[/TD]
[TD]a[/TD]
[TD]2[/TD]
[/TR]
[TR]
[TD]1/1/15[/TD]
[TD]b[/TD]
[TD]5[/TD]
[/TR]
[TR]
[TD]1/1/17[/TD]
[TD]a[/TD]
[TD]7[/TD]
[/TR]
</tbody>[/TABLE]
 
Upvote 0
how would you write the formula if you had a name column added. [....] I earlier tried
=GEOMEAN(IF(AND(A2:A9 >= DATE(2010,1,1),B2:B9 = "A"), IF(AND(A2:A9 <= DATE(2013,1,1),B2:B9="A"), C2:C9)))


Array-enter (press ctrl+shift+Enter instead of just Enter) a formula of the following form:

=GEOMEAN(IF(B2:B9 = "A", IF(A2:A9 >= DATE(2010,1,1), IF(A2:A9 <= DATE(2013,1,1), C2:C9))))
 
Upvote 0

Forum statistics

Threads
1,223,911
Messages
6,175,333
Members
452,636
Latest member
laura12345

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top