If same Month & Year, return a value skipping Blank cells

colzre

New Member
Joined
Jan 8, 2024
Messages
25
Office Version
  1. 365
Platform
  1. Windows
Hello Experts!


I am trying to build a formula where if same month is a on both cells (column E and I), this will return as 1.

It does work when there is a date on each cell however when cells are blank, I would like this to return as 0 which is same value as when cells don´t match.

Row 7 works and row 28 still need to return as 0, rather than 1 since it´s blank.

Any advice?


DATABASE TURNOVER REPORT PANORAM HOTELS 2024 - Copy.xlsx
EIP
6MonthSTART DATE ENTRIES
7Jun-2024Jan-20240
281
bbdd
Cell Formulas
RangeFormula
P7,P28P7=IF(MONTH(I7)&YEAR(I7)=MONTH(E7)&YEAR(E7),1,0)


I appreciate your help beforehand!

John
 

Excel Facts

Select a hidden cell
Somehide hide payroll data in column G? Press F5. Type G1. Enter. Look in formula bar while you arrow down through G.
How about
Excel Formula:
=IF(OR(E7="",MONTH(I7)&YEAR(I7)<>MONTH(E7)&YEAR(E7)),0,1)
 
Upvote 0
Solution
Try this in P7 and copy down:

Excel Formula:
=(E7<>"")*(MONTH(E7)=MONTH(I7))*(YEAR(E7)=YEAR(I7))
 
Upvote 0
Glad we could help & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,224,818
Messages
6,181,151
Members
453,021
Latest member
Justyna P

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