If Statement Help

Status
Not open for further replies.

Walker_Ice

Board Regular
Joined
Oct 6, 2023
Messages
50
Office Version
  1. 2021
Platform
  1. MacOS
Hi Everyone,

I"ve been trying to figure out how to do this and been stuck for over a week. I created this custom report table, which works great. But the problem, I'm having is if I enter a "Start Date" which has a different year then my "End Year". It doesn't include the data from the different months in between the start year and end year.

For example, If I select 6/1/2023 until 9/30/2023. I gives me the correct data for those months because they are also in the same year.
But if I select 6/1/2022 until 9/30/2023, the formula I came up with doesn't know that it needs to get the data for all the months in between those dates because they are from different years.

I think I need an If statement, to resolve the problem. But I'm not sure. Can someone please take a look and help if possible? Below is the formula I am using with the SUMIFS function.

Thank you, in advance.

=SUMIFS(Income_TotalPay,Income_Dates,">="&DATE(K28,MONTH($L$25),DAY($L$25)),Income_Dates,"<="&DATE(K28,MONTH($N$25),DAY($N$25)))


Screenshot 2023-10-07 at 10.47.25 AM.png
Screenshot 2023-10-07 at 10.52.24 AM.png
 

Excel Facts

Copy formula down without changing references
If you have =SUM(F2:F49) in F50; type Alt+' in F51 to copy =SUM(F2:F49) to F51, leaving the formula in edit mode. Change SUM to COUNT.
Duplicate to: HELP! SUMIFS/Logic/Dates Functions

In future, please do not post the same question multiple times. Per Forum Rules (#12), posts of a duplicate nature will be locked or deleted.

In relation to your question here, I have closed this thread so please continue in the linked thread.
 
Upvote 0
Status
Not open for further replies.

Forum statistics

Threads
1,223,893
Messages
6,175,246
Members
452,623
Latest member
cliftonhandyman

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