" IF And" statement

rmrossetti

New Member
Joined
Jan 11, 2016
Messages
30
Hello! Trying to build a formula that counts an employee as 1 if they are active and had a start date prior to the month in cell E3, F3, G3 and so on. If they are termed, than I would like to pull a 0 in subsequent periods, but keep the 1 where there were active. For instance, on john doe, I would like to show them as 1 in January, 1 in February, but 0 in March. This is what I entered, but something isn't clicking for me. =IF(AND($C5="",$B5<F$3),1,0), the problem is this will also result in 0 for January since it's true, false. Thank you!


1704327278721.png


EDIT:
Sorry, quick note, I would like to show them as 0 in March, but count them in Jan and Feb, since the term sate was end of the month in Feb.
 
Last edited by a moderator:

Excel Facts

Copy a format multiple times
Select a formatted range. Double-click the Format Painter (left side of Home tab). You can paste formatting multiple times. Esc to stop
Maybe this is what you are looking for? A bit confused based on the quick note you posted.

PERSONAL.xlsm
ABCDEFGHIJK
1 EmployeeStart DatEnd DateStatusJan-24Feb-24Mar-24Apr-24May-24
2John Doe1/1/2002/28/2024Termed11000
3Jane Doe1/4/20213/2/2024Active11111
4John Wick6/1/20214/4/2024Active11111
5Mike Jones6/3/20233/1/2024Termed11100
6
7
8
9
10
11
12
13
14
Sheet4
Cell Formulas
RangeFormula
E2:I5E2=IF(AND($D2="Termed",$C2<E$1),0,1)

 
Last edited:
Upvote 0
Solution

Forum statistics

Threads
1,224,823
Messages
6,181,181
Members
453,022
Latest member
Mohamed Magdi Tawfiq Emam

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