ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Formula returning wrong result. (https://www.excelbanter.com/excel-worksheet-functions/121235-formula-returning-wrong-result.html)

Steve Hunt

Formula returning wrong result.
 
I have the following columns where I need to produce a result for cells in
column U based on the result of cells in Column Y.
However at the moment cells in column Y result in YES being returned all the
time. Then when I put "DONE" in column S resulting
in the date appearing in Column T, Y then returns "FALSE". Can't work this
out. Any help welcome.


Column L Column S Column T Column U
Column W Column X Column Y

Date Maint Maint Date Maint Maint Within
Date 45 days Date 45 days
is Due Done Done 90 day
window before due Date after due Date

This field is "Done" On entering Looks at Y
Column L -45 Column L +45 If T is more than
manually is entered "Done" in S Needs to return
or =toW and less
entered. in this field. todays date Yes if T is
between
than or = to X then
is auto inserted W and
X. Return
return "YES"

No if not and blank

if nothing entered

in T.

Column U =IF(Y2="YES","YES","NO")
Column W =SUM(L2-45)
Column X =SUM(L2+45)
Column Y =IF(AND(T2=W2),T2<=X2,"YES")

Maint Due Maint Done Date Maint Done Maint Within 90
Date 45 daysbefore Date 45 days after YES/NO or

Day Window Due Date Due Date
BLANK

08/01/2006 DONE 02/12/2006 NO
24/11/2005 22/02/2006 FALSE

This is an example result. It should have returned Yes as the result not
FALSE.


Help please.

Thanks in advance.



Roger Govier

Formula returning wrong result.
 
Hi Steve

Column Y =IF(AND(T2=W2),T2<=X2,"YES")

Should be
=IF(AND(T2=W2,T2<=X2),"YES","NO")

Not sure what you wanted for the False case. Change "NO" to whatever you
require.

--
Regards

Roger Govier


"Steve Hunt" wrote in message
. uk...
I have the following columns where I need to produce a result for cells
in column U based on the result of cells in Column Y.
However at the moment cells in column Y result in YES being returned
all the time. Then when I put "DONE" in column S resulting
in the date appearing in Column T, Y then returns "FALSE". Can't work
this out. Any help welcome.


Column L Column S Column T Column U Column
W Column X Column Y

Date Maint Maint Date Maint Maint Within
Date 45 days Date 45 days
is Due Done Done 90 day
window before due Date after due Date

This field is "Done" On entering Looks at
Y Column L -45 Column L +45 If T is more than
manually is entered "Done" in S Needs to
return or =toW and less
entered. in this field. todays date Yes if
T is between than or = to X then
is auto inserted W
and X. Return return "YES"

No if not and blank

if nothing entered

in T.

Column U =IF(Y2="YES","YES","NO")
Column W =SUM(L2-45)
Column X =SUM(L2+45)
Column Y =IF(AND(T2=W2),T2<=X2,"YES")

Maint Due Maint Done Date Maint Done Maint Within 90 Date
45 daysbefore Date 45 days after YES/NO or

Day Window Due Date Due Date BLANK

08/01/2006 DONE 02/12/2006 NO 24/11/2005
22/02/2006 FALSE

This is an example result. It should have returned Yes as the result
not FALSE.


Help please.

Thanks in advance.





All times are GMT +1. The time now is 09:17 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com