IF AND MONTH

excelquestioner123

New Member
Joined
Feb 24, 2021
Messages
4
Office Version
  1. 365
Platform
  1. Windows
I am trying to make a formula based on if someone replied in the month. So if the name is listed anywhere on the sheet but the date in the same row in December for example. I have tried everything from the Month function to greater than less than function.
=IF(AND('DATA INPUT'!$A:$A='Observers'!$A2,MONTH('DATA INPUT'!$B:$B=MONTH(12))),"Yes","No")
=IF(AND('DATA INPUT'!$A:$A='Observers'!$A24,('DATA INPUT'!B:B>"11/31/2020"),('DATA INPUT'!B:B<"1/1/2021")),"Yes","No")
 

Excel Facts

Repeat Last Command
Pressing F4 adds dollar signs when editing a formula. When not editing, F4 repeats last command.
Maybe:
MrExcelPlayground.xlsm
ABCDEF
1NameDateNameMonthDid person have record in month?
2Jamie11/2/2020FredJan-21yes
3Jamie11/22/2020JamieJan-21no
4Jamie11/24/2020JamieNov-20yes
5Jamie12/19/2020GooseFeb-21yes
6Fred12/28/2020GooseJan-21no
7Fred1/6/2021MaverickJan-21no
8Fred1/23/2021MaverickMar-21yes
9Fred2/1/2021
10Harry2/7/2021
11Goose2/16/2021
12Goose3/9/2021
13Maverick3/21/2021
14Maverick3/26/2021
15Maverick4/20/2021
16Maverick4/24/2021
Sheet29
Cell Formulas
RangeFormula
F2:F8F2=IF(SUMPRODUCT(--($A$2:$A$16=D2),--(DATE(YEAR($B$2:$B$16),MONTH($B$2:$B$16),1)=E2))>0,"yes","no")
 
Upvote 0
Hi & welcome to MrExcel.
How about
Excel Formula:
=IF(COUNTIFS('DATA INPUT'!$A:$A,A2,'DATA INPUT'!B:B,">"&DATE(2020,31,11),'DATA INPUT'!B:B,"<"&DATE(2021,1,1)),"yes","No")
 
Upvote 0
1614201211681.png
 
Upvote 0
Hi & welcome to MrExcel.
How about
Excel Formula:
=IF(COUNTIFS('DATA INPUT'!$A:$A,A2,'DATA INPUT'!B:B,">"&DATE(2020,31,11),'DATA INPUT'!B:B,"<"&DATE(2021,1,1)),"yes","No")
This one didn't work for me. Could it be because I am pulling from a different sheet and using the entire column?
 
Upvote 0
Maybe:
MrExcelPlayground.xlsm
ABCDEF
1NameDateNameMonthDid person have record in month?
2Jamie11/2/2020FredJan-21yes
3Jamie11/22/2020JamieJan-21no
4Jamie11/24/2020JamieNov-20yes
5Jamie12/19/2020GooseFeb-21yes
6Fred12/28/2020GooseJan-21no
7Fred1/6/2021MaverickJan-21no
8Fred1/23/2021MaverickMar-21yes
9Fred2/1/2021
10Harry2/7/2021
11Goose2/16/2021
12Goose3/9/2021
13Maverick3/21/2021
14Maverick3/26/2021
15Maverick4/20/2021
16Maverick4/24/2021
Sheet29
Cell Formulas
RangeFormula
F2:F8F2=IF(SUMPRODUCT(--($A$2:$A$16=D2),--(DATE(YEAR($B$2:$B$16),MONTH($B$2:$B$16),1)=E2))>0,"yes","no")
This one didn't work for me!
 
Upvote 0
I don't know if you have the possibility to create this alternative, but what I did, I added 2 columns to the right of the date column (one for month - =MONTH(B2) and one for year - =YEAR(B2)) and then I used a combo of if and countifs:
Cell I2 =IF(COUNTIFS($A$2:$A$16,E2,$C$2:$C$16,MONTH(F2),$D$2:$D$16,YEAR(F2))>0,"YES","NO")
1614203853192.png
 
Upvote 0
This one didn't work for me. Could it be because I am pulling from a different sheet and using the entire column?
1) Try the below modified version of Fluff's formula
Modification was change DATE(2020,31,11) to DATE(2020,11,31)
format is Date(Year,Month,Day)

See here:-
Excel Formula:
Excel Formula:
=IF(COUNTIFS('DATA INPUT'!$A:$A,A2,'DATA INPUT'!B:B,">"&DATE(2020,11,31),'DATA INPUT'!B:B,"<"&DATE(2021,1,1)),"yes","No")

2) Assuming you are putting the formula in the sheet Inpatient Observers, its not failing because its on a different sheet,
 
Upvote 0

Forum statistics

Threads
1,214,815
Messages
6,121,715
Members
449,049
Latest member
THMarana

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