ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   IF statement returns false when statment is True (https://www.excelbanter.com/excel-worksheet-functions/450915-if-statement-returns-false-when-statment-true.html)

[email protected]

IF statement returns false when statment is True
 
I have the following formula:

=IF(AND(S95<"",TODAY()<S95),"Investigating PFM",IF(AND(S95<"",TODAY()S95,T95=""),TODAY()-S95&" "&""&"Days Past Due",IF(AND(S95="",T95<""),"Investigation Report Received",IF(AND(S95<"",T95<""),"Investigation Report Received",IF(L95="District Did Not Investigate","PFM Withdrawn",IF(AND(S95="",TODAY()Q95),TODAY()-Q95&" "&""&"Days Past Due",IF(AND(S95="",TODAY()<Q95),"Investigating PFM")))))))

This statement return false when in reality it is true. Why?
IF(L95="District Did Not Investigate","PFM Withdrawn"

Claus Busch

IF statement returns false when statment is True
 
Hi Don,

Am Wed, 3 Jun 2015 05:14:30 -0700 (PDT) schrieb :

=IF(AND(S95<"",TODAY()<S95),"Investigating PFM",IF(AND(S95<"",TODAY()S95,T95=""),TODAY()-S95&" "&""&"Days Past Due",IF(AND(S95="",T95<""),"Investigation Report Received",IF(AND(S95<"",T95<""),"Investigation Report Received",IF(L95="District Did Not Investigate","PFM Withdrawn",IF(AND(S95="",TODAY()Q95),TODAY()-Q95&" "&""&"Days Past Due",IF(AND(S95="",TODAY()<Q95),"Investigating PFM")))))))

This statement return false when in reality it is true. Why?
IF(L95="District Did Not Investigate","PFM Withdrawn"


you have to put the conditions into the formula in the order of your
priority. The conditions are checked from left to right and if the first
condition is TRUE you get the output for this condition. Following
conditions will not be checked.
Try:
=IF(L95="District Did Not Investigate","PFM Withdrawn",IF(TODAY()<S95,"Investigating PFM",IF(AND(S95<"",TODAY()S95,T95=""),TODAY()-S95&" "&""&"Days Past Due",IF(AND(S95="",T95<""),"Investigation Report Received",IF(AND(S95<"",T95<""),"Investigation Report Received",IF(AND(S95="",TODAY()Q95),TODAY()-Q95&" "&""&"Days Past Due",IF(AND(S95="",TODAY()<Q95),"Investigating PFM")))))))


Regards
Claus B.
--
Vista Ultimate / Windows7
Office 2007 Ultimate / 2010 Professional

[email protected]

IF statement returns false when statment is True
 
Claus

Thanks very much for the help but I get the same answer. The formula is recognizing L95 as false when in reality it is true. In l95 I have a drop down list that I make a selection from but for whatever reason the formula is returning a result of false.

On Wednesday, June 3, 2015 at 8:14:32 AM UTC-4, wrote:
I have the following formula:

=IF(AND(S95<"",TODAY()<S95),"Investigating PFM",IF(AND(S95<"",TODAY()S95,T95=""),TODAY()-S95&" "&""&"Days Past Due",IF(AND(S95="",T95<""),"Investigation Report Received",IF(AND(S95<"",T95<""),"Investigation Report Received",IF(L95="District Did Not Investigate","PFM Withdrawn",IF(AND(S95="",TODAY()Q95),TODAY()-Q95&" "&""&"Days Past Due",IF(AND(S95="",TODAY()<Q95),"Investigating PFM")))))))

This statement return false when in reality it is true. Why?
IF(L95="District Did Not Investigate","PFM Withdrawn"



Claus Busch

IF statement returns false when statment is True
 
Hi Don,

Am Wed, 3 Jun 2015 06:04:01 -0700 (PDT) schrieb :

Thanks very much for the help but I get the same answer. The formula is recognizing L95 as false when in reality it is true. In l95 I have a drop down list that I make a selection from but for whatever reason the formula is returning a result of false.


the formula is tested in Excel and it worked well. Check the spelling in
L95 and in your formula if it matches. Perhaps you have leading or
trailing spaces in L95.

=IF(L95="District Did Not Investigate","PFM Withdrawn",IF(TODAY()<S95,"Investigating PFM",IF(AND(S95<"",TODAY()S95,T95=""),TODAY()-S95&" "&""&"Days Past Due",IF(AND(S95="",T95<""),"Investigation Report Received",IF(AND(S95<"",T95<""),"Investigation Report Received",IF(AND(S95="",TODAY()Q95),TODAY()-Q95&" "&""&"Days Past Due",IF(AND(S95="",TODAY()<Q95),"Investigating PFM","")))))))


Regards
Claus B.
--
Vista Ultimate / Windows7
Office 2007 Ultimate / 2010 Professional

Don B[_2_]

IF statement returns false when statment is True
 
Claus

Thanks very much for your help. That was the problem. I had extra spaces at the end of the text in L95 that was throwing off the formula. Again thanks very much.

Don

On Wednesday, June 3, 2015 at 8:14:32 AM UTC-4, Don B wrote:
I have the following formula:

=IF(AND(S95<"",TODAY()<S95),"Investigating PFM",IF(AND(S95<"",TODAY()S95,T95=""),TODAY()-S95&" "&""&"Days Past Due",IF(AND(S95="",T95<""),"Investigation Report Received",IF(AND(S95<"",T95<""),"Investigation Report Received",IF(L95="District Did Not Investigate","PFM Withdrawn",IF(AND(S95="",TODAY()Q95),TODAY()-Q95&" "&""&"Days Past Due",IF(AND(S95="",TODAY()<Q95),"Investigating PFM")))))))

This statement return false when in reality it is true. Why?
IF(L95="District Did Not Investigate","PFM Withdrawn"




All times are GMT +1. The time now is 09:49 AM.

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