Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Can anyone help me with where to put the parenthesis in this expression. Can't for the life of me figure out where I'm going wrong.
=SUM(IF(Year(DocumentDate) = YEAR(Today())-1 and month(DocumentDate) < month(Today()) or Year(DocumentDate) = YEAR(Today())-1 and (month(DocumentDate) = month(Today())
and (day(DocumentDate) =< day(Today()),1,0))
try This
=SUM(
IF(
(Year(DocumentDate) = YEAR(Today())-1 and month(DocumentDate) < month(Today()) )
or
(Year(DocumentDate) = YEAR(Today())-1 and month(DocumentDate) = month(Today()) )
and
day(DocumentDate) <= day(Today())
,1,0)
)
Can you tell on what condition you need 1 and on what 0?
try with this.....
=sum(
if (
year(DocumentDate)=year(today())-1 and month(Documentdate) < month(today()) or
(year(DocumentDate) =year(today()) -1 and month(DocumentDate) = Mlonth(today()) and day(documentDate) <= day(today())),
1, 0
)
)
Is this what you want ? looks much simpler with this
=SUM(IF(Year(DocumentDate) = YEAR(Today())-1 and month(DocumentDate) <= month(Today())
and day(DocumentDate) =< day(Today()),1,0))
Hi Robert,
Placing parenthesis will depends up on expected output.
Can you explain briefly, while using this condition what is the expected output ?
Kindly post a sample workbook. It will helps to all to understand your requirement clearly.
Thanks,
Venkata Sreekanth