Sumproduct Datedif Multiple criterias

Lmcb

New Member
Joined
Sep 2, 2021
Messages
1
Office Version
  1. 365
Platform
  1. Windows
Hello everyone,

I would like to count with your help,

Im trying to do a tenure counting of persons per each month of the year, if the person is still active i do not insert date in the leave date column. I would like to use sumproduct if possible, and ignore the black leave date cells from the active sheet.

So for each month as per example January 2021, how many persons were working with less than 3 months, with more than 6 months and less than a year, and with more than 18 months, including persons who left and the actual active persons.

Can you someone send me suggestions?

Thanks
 

Attachments

  • Leave Date.JPG
    Leave Date.JPG
    43.3 KB · Views: 14
  • Active.JPG
    Active.JPG
    44.1 KB · Views: 16
  • Table.JPG
    Table.JPG
    25.1 KB · Views: 16
  • Sheet.JPG
    Sheet.JPG
    9.5 KB · Views: 16

Excel Facts

Bring active cell back into view
Start at A1 and select to A9999 while writing a formula, you can't see A1 anymore. Press Ctrl+Backspace to bring active cell into view.
Welcome to the MrExcel forum!

Try:

Book4 (version 1).xlsb
ABCDEFGHI
1Hire DateLeave DateCounter00-0303-0606-1212-1818-99999
26-Nov-202-Jul-21
38-Jan-213-Jul-21Jan-21361000
414-May-213-Jul-21Feb-211527000
58-Jan-217-Jul-21Mar-21537000
616-Oct-209-Jul-21Apr-21536100
729-Jan-2112-Jul-21May-211152700
816-Oct-2015-Jul-21Jun-21753700
96-Nov-2016-Jul-21Jul-21853600
1014-May-2117-Jul-21Aug-21413200
1114-May-2122-Jul-21Sep-21122600
1216-Oct-2022-Jul-21Oct-21032410
136-Nov-201-Jul-21Nov-21025230
1427-Nov-202-Jul-21Dec-21012250
1514-May-212-Aug-21
1614-May-219-Aug-21
1727-Nov-2016-Aug-21
186-Nov-2020-Aug-21
198-Jan-2123-Aug-21
2011-Jan-2124-Aug-21
2116-Oct-2024-Aug-21
2211-Sep-20
2316-Oct-20
2416-Oct-20
2521-May-21
269-Jun-21
2716-Oct-20
281-May-21
2916-Oct-20
3016-Oct-20
316-Nov-20
3227-Nov-20
3327-Nov-20
346-Nov-20
3516-Oct-20
3616-Oct-20
3716-Oct-20
3816-Oct-20
3916-Oct-20
4016-Oct-20
4116-Oct-2020-Sep-21
4216-Oct-20
4316-Oct-20
4416-Oct-20
4516-Oct-20
4616-Oct-20
4716-Oct-20
4816-Oct-201-Sep-21
4916-Oct-20
5016-Oct-20
5123-Oct-20
Sheet10
Cell Formulas
RangeFormula
E3:I14E3=SUMPRODUCT(--(($B$2:$B$51>$D3)+($B$2:$B$51="")),--($D3-$A$2:$A$51>=LEFT(E$1,2)*30),--($D3-$A$2:$A$51<=MID(E$1,4,5)*30))


Incidentally, this forum has a tool called XL2BB, which I just used to show my results. It makes it easier to copy data to test with. You probably would have had a quicker response if you'd used it. Check out the XL2BB link in my signature or the response box. It's easy to download, install, and use.
 
Upvote 0
Solution

Forum statistics

Threads
1,223,893
Messages
6,175,240
Members
452,621
Latest member
Laura_PinksBTHFT

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