Sumif

franklinsam

New Member
Joined
Oct 1, 2023
Messages
17
Office Version
  1. 365
Platform
  1. Windows
I have an Excel table that is called Withdrawals, column1 is the date column and column2 is the amount. I'm trying to get a sum of column2 where the year in column1 is the current year. My formula looks like this
=SUMIF(YEAR(Withdraws[Date]),2023,Withdraws[Amount])

Excel is telling me that there is an error with the formula.

1696167213382.png


Any ideas why I'm getting this error?
 

Excel Facts

Convert text numbers to real numbers
Select a column containing text numbers. Press Alt+D E F to quickly convert text to numbers. Faster than "Convert to Number"
The range must be a range not an array. try using sumproduct instead
Excel Formula:
=sumproduct((YEAR(Withdraws[Date])=2023),Withdraws[Amount])
 
Upvote 0
Solution
This works with 1 modification

=sumproduct(--(YEAR(Withdraws[Date])=2023),Withdraws[Amount])
 
Upvote 0

Forum statistics

Threads
1,223,879
Messages
6,175,142
Members
452,615
Latest member
bogeys2birdies

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