Formula that looks only at dates which fall during the current calendar year (relatively speaking)

Aimee S.

Board Regular
Joined
Sep 28, 2010
Messages
236
Office Version
  1. 365
Platform
  1. Windows
Hello.

I have this formula which looks at dates that fall in the prior calendar month (relatively speaking). I will highlight that section in bold font:


=IFERROR(SUMPRODUCT(--('Metric Data #4'!$D$5:'Metric Data #4'!$D$7402=$P116),--(TEXT('Metric Data #4'!$E$5:'Metric Data #4'!$E$7402,"mmmyyyy")=TEXT(YEAR(TODAY()),"mmmyyyy"))),"n/a")


I want this same formula but with the part in bold to look for values not in the prior month only, but for the entire current calendar year, whatever that may be (currently 2011 but will change to 2012 Jan 1.

If i am not being fully clear let me know and thanks in advance for all your help!

Aimee
 

Excel Facts

Return population for a City
If you have a list of cities in A2:A100, use Data, Geography. Then =A2.Population and copy down.
Looks like you want...
Rich (BB code):
=IFERROR(
   SUMPRODUCT(
     --('Metric Data #4'!$D$5:$D$7402=$P116),
     --(YEAR('Metric Data #4'!$E$5:$E$7402)=YEAR(TODAY())),
   "n/a")
 
Upvote 0
Wicked! That works. Just had to add one more ) to make excel happy and voila! Thanks so much!

Code:
=IFERROR(SUMPRODUCT(--('Metric Data #4'!$D$5:$D$7402=$P116),--(YEAR('Metric Data #4'!$E$5:$E$7402)=YEAR(TODAY()))),"n/a")
 
Upvote 0
Hello.

I have this formula which looks at dates that fall in the prior calendar month (relatively speaking). I will highlight that section in bold font:


=IFERROR(SUMPRODUCT(--('Metric Data #4'!$D$5:'Metric Data #4'!$D$7402=$P116),--(TEXT('Metric Data #4'!$E$5:'Metric Data #4'!$E$7402,"mmmyyyy")=TEXT(YEAR(TODAY()),"mmmyyyy"))),"n/a")


I want this same formula but with the part in bold to look for values not in the prior month only, but for the entire current calendar year, whatever that may be (currently 2011 but will change to 2012 Jan 1.

If i am not being fully clear let me know and thanks in advance for all your help!

Aimee
Try this...

=IFERROR(SUMPRODUCT(--('Metric Data #4'!$D$5:$D$7402=$P116),--(YEAR('Metric Data #4'!$E$5:$E$7402)=YEAR(NOW()))),"n/a")
 
Upvote 0
Wicked! That works. Just had to add one more ) to make excel happy and voila! Thanks so much!

Code:
=IFERROR(SUMPRODUCT(--('Metric Data #4'!$D$5:$D$7402=$P116),--(YEAR('Metric Data #4'!$E$5:$E$7402)=YEAR(TODAY()))),"n/a")

Great. Thanks for providing feedback.
 
Upvote 0

Forum statistics

Threads
1,224,550
Messages
6,179,463
Members
452,915
Latest member
hannnahheileen

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