Sumproduct question regarding dates

trendon

New Member
Joined
Jun 6, 2004
Messages
16
Hello!

I needed to fill a cell that counts how many wagers I made in a year. So I use =SUMPRODUCT(1*(YEAR(Straight!A:A)=2023)) and it failed so I had to switch to =SUMPRODUCT(1*(YEAR(Straight!A2:A50000)=2023))

1. Did the initial formula where I look at the entire column fail because of the first row containing words?

2. Is there a better way for me to go about it?

Thanks, you guys are the best and I really appreciate it.
 

Excel Facts

When did Power Query debut in Excel?
Although it was an add-in in Excel 2010 & Excel 2013, Power Query became a part of Excel in 2016, in Data, Get & Transform Data.
Hi,
1. Yes
2. You could try
Excel Formula:
 =COUNTIFS(A:A,">="&DATE(2023,1,1),A:A,"<"&DATE(2023,12,31)+1)
 
Upvote 1
Solution
Did the initial formula where I look at the entire column fail because of the first row containing words?
Yes

Is there a better way for me to go about it?
That depends on your version of Excel.

I suggest that you update your Account details (or click your user name at the top right of the forum) so helpers always know what Excel version(s) & platform(s) you are using as the best solution often varies by version. (Don’t forget to scroll down & ‘Save’)
 
Upvote 1
And what version of Excel are you using?
 
Upvote 0

Forum statistics

Threads
1,215,689
Messages
6,126,215
Members
449,302
Latest member
rsizemore75

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