"IF" "SUMPRODUCT" Issue

GLWild

New Member
Joined
Oct 25, 2022
Messages
2
Office Version
  1. 2016
I am trying to give a condition before a "SUMPRODUCT" occurs. The formula works fine until I try to give it a condition before its occurrence. =SUMPRODUCT(--($A$8:$A$126="VACATION PAID"), $AH$8:$AH$126).
This is an attendance calendar grid. Everyone gets paid time off after a years' anniversary. The formula adds the days used and subtracts those days from the allotted time off given every year. The anniversary date is at the top of the calendar. I want to have the SUMPRODUCT work while the anniversary day and month are less than today and then I will set up another formula to do the same thing after that date. I'm trying to do something like IF TODAY()<DATE,(MONTH(N2), < DATE(DAY(N2), SUMPRODUCT...and so forth. But it isn't working. Can this be done and if so, will you please show me how to make it work? Thank you so much for your time!

GLWild
 

Excel Facts

Best way to learn Power Query?
Read M is for (Data) Monkey book by Ken Puls and Miguel Escobar. It is the complete guide to Power Query.
Maybe
Excel Formula:
=IF(TEXT(MONTH(TODAY()),"00")&TEXT(DAY(TODAY()),"00")>TEXT(MONTH(N2),"00")&TEXT(DAY(N2),"00"),SUMPRODUCT(($A$8:$A$126="VACATION PAID")*($AH$8:$AH$126)),SUMPRODUCT(($A$8:$A$126="VACATION NOT PAID")*($AG$8:$AG$126)))
Adjust the last SUMPRODUCT function accordingly to your needs, of course.
 
Upvote 0
Solution

Forum statistics

Threads
1,214,965
Messages
6,122,496
Members
449,089
Latest member
Raviguru

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