If conditions

gerson02

New Member
Joined
Sep 9, 2018
Messages
10
Hi everyone please help me.
I have difficulty in my excel formula.
I have my start date 4/2/2018 (a1) and completed date 4/11/2018 (b1) to calculate within a month which until 4/30, value must be 1 otherwise 0 (c1)
Thank you in advance for you response.
 

Excel Facts

Round to nearest half hour?
Use =MROUND(A2,"0:30") to round to nearest half hour. Use =CEILING(A2,"0:30") to round to next half hour.
Hi,

Please explain what you are trying to calculate, This is all you have told us so far:

A1 = Start Date
B1 = Completed Date
C1 = Result you want, 1 or 0
and calculate within a month until 4/30 ???
 
Upvote 0
Sorry i can't show you a screenshot because I'm using mobile. Below is the sample hope you get it..
"If the date completes within the month (4/30/2018), put 1 otherwise 0."

Start date Completion date Monthly
4/2/2018 4/11/2018 ??? must be 1
4/10/2018 5/1/2018 ??? must be 0
4/8/2018 4/2/2018 ??? must be 0
 
Upvote 0
Try:
Code:
=--(AND ( B1 > A1,B1 < Date(2018,5,1)))
(without the spaces)<date(2018,5,1)))[ code]<="" html=""></date(2018,5,1)))[>
 
Last edited:
Upvote 0
Ok,

Your 3rd sample is incorrect?


Book1
ABC
1Start DateCompletion DateWithin Same Month
24/2/20184/11/20181
34/10/20185/1/20180
44/8/20184/2/2018?????????
Sheet235
Cell Formulas
RangeFormula
C2=--AND(MONTH(A2)=MONTH(B2),YEAR(A2)=YEAR(B2))
 
Upvote 0
Hi & welcome to MrExcel.
Is this what you want


Excel 2013 32 bit
ABC
102/04/201811/04/20181
210/04/201801/05/20180
308/04/201802/04/20190
Sheet3
Cell Formulas
RangeFormula
C1=--(EOMONTH(A1,0)=EOMONTH(B1,0))
 
Upvote 0
Glad we could help & thanks for the feedback
 
Upvote 0

Forum statistics

Threads
1,223,910
Messages
6,175,318
Members
452,634
Latest member
cpostell

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