Forum

Notifications
Clear all

Sumif

2 Posts
1 Users
0 Reactions
132 Views
(@retiredit)
Posts: 22
Eminent Member
Topic starter
 

I have an Excel table called Withdrawals, column1 is the date (mm/dd/yyyy) and column2 is the amount. I am trying to add all amounts where year is the current year. My formula looks like this

=sumif(YEAR(Withdraws[Date]),2023,Withdraws[Amount])

For some reason Excel doesn't like this formula.

What I would really like is to use the tab name instead of a hard coded date but that seems to add to my confusion.

 

Any help would be very appreciated.

Thanks

Sam

 
Posted : 02/10/2023 9:53 am
(@retiredit)
Posts: 22
Eminent Member
Topic starter
 

Discovered the solution and why the previous formula didn't work. The correct formula, that works is

 

=SUMPRODUCT(--(YEAR(Withdraws[Date])=2023),Withdraws[Amount])

 
Posted : 02/10/2023 1:26 pm
Share: