Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Bill R
 
Posts: n/a
Default First part of "IF" function returns false even if true. ??

=IF((O12=12/31/2005),(IF(ISERROR(SUM(((F32)/(DAYS360(DATE(2004,12,31),X1,FALSE)))*(360))*(F13) ),"",(SUM(((F32)/(DAYS360(DATE(2004,12,31),X1,FALSE)))*(360))*(F13) ))),F12)

The first part of the formula, (O12=12/31/2005), returns false even if it's
true. The rest of the formula works great.

Any suggestions?

  #2   Report Post  
JE McGimpsey
 
Posts: n/a
Default

Unless O12 = 0.0001930657227898, the comparison will always be false.

12 divided by 31 divided by 2005 = 0.000193...

You could force XL to parse as a date by enclosing "12/31/2005" in
quotes, or you could use the DATE function:

IF(O12=DATE(2005,12,31),....


In article ,
Bill R wrote:

=IF((O12=12/31/2005),(IF(ISERROR(SUM(((F32)/(DAYS360(DATE(2004,12,31),X1,FALSE
)))*(360))*(F13)),"",(SUM(((F32)/(DAYS360(DATE(2004,12,31),X1,FALSE)))*(360))*
(F13)))),F12)

The first part of the formula, (O12=12/31/2005), returns false even if it's
true. The rest of the formula works great.

Any suggestions?

  #3   Report Post  
Bill R
 
Posts: n/a
Default

Works great! Thanks! One more question,please. When I copy the formula to
other cells the cell references that refer to dates are not correct. How can
I fix it? I am pulling the dates from a list on the same sheet. Thanks again.

Here is the final working formula:
=IF((O12=DATE(2005,12,31)),(IF(ISERROR(SUM((F32)/(DAYS360(N12,$X1,FALSE)))*(365))*(F13),"",(SUM(((F 32)/(DAYS360(N12,$X1,FALSE)))*(365))*(F13)))),F12)

"JE McGimpsey" wrote:

Unless O12 = 0.0001930657227898, the comparison will always be false.

12 divided by 31 divided by 2005 = 0.000193...

You could force XL to parse as a date by enclosing "12/31/2005" in
quotes, or you could use the DATE function:

IF(O12=DATE(2005,12,31),....


In article ,
Bill R wrote:

=IF((O12=12/31/2005),(IF(ISERROR(SUM(((F32)/(DAYS360(DATE(2004,12,31),X1,FALSE
)))*(360))*(F13)),"",(SUM(((F32)/(DAYS360(DATE(2004,12,31),X1,FALSE)))*(360))*
(F13)))),F12)

The first part of the formula, (O12=12/31/2005), returns false even if it's
true. The rest of the formula works great.

Any suggestions?


  #4   Report Post  
RFJ
 
Posts: n/a
Default

You're trying to compare a cell which is formatted as a date with a multiple
division (12 divided by 31 divided by 2005) so it will never work

A quick workaround is to put your date in another cell, say z99 and then
change your formula to

If((O12=Z99,true,false)


"Bill R" wrote in message
...
=IF((O12=12/31/2005),(IF(ISERROR(SUM(((F32)/(DAYS360(DATE(2004,12,31),X1,FALSE)))*(360))*(F13) ),"",(SUM(((F32)/(DAYS360(DATE(2004,12,31),X1,FALSE)))*(360))*(F13) ))),F12)

The first part of the formula, (O12=12/31/2005), returns false even if
it's
true. The rest of the formula works great.

Any suggestions?



  #5   Report Post  
Bill R
 
Posts: n/a
Default

Thanks, but my formula does work now. I am just trying to find an eaisier way
to copy it now.
Here is what I have done to try to help it copy better:

=IF((Fin3_enddate=DATE(2005,12,31)),(IF(ISERROR(SU M((F32)/(DAYS360(Fin3_startdate,$X1,FALSE)))*(365))*(F13), "",(SUM(((F32)/(DAYS360(Fin3_startdate,$X1,FALSE)))*(365))*(F13)) )),F12)

"RFJ" wrote:

You're trying to compare a cell which is formatted as a date with a multiple
division (12 divided by 31 divided by 2005) so it will never work

A quick workaround is to put your date in another cell, say z99 and then
change your formula to

If((O12=Z99,true,false)


"Bill R" wrote in message
...
=IF((O12=12/31/2005),(IF(ISERROR(SUM(((F32)/(DAYS360(DATE(2004,12,31),X1,FALSE)))*(360))*(F13) ),"",(SUM(((F32)/(DAYS360(DATE(2004,12,31),X1,FALSE)))*(360))*(F13) ))),F12)

The first part of the formula, (O12=12/31/2005), returns false even if
it's
true. The rest of the formula works great.

Any suggestions?






Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
IF is not carrying out the FALSE part derekbrown Excel Worksheet Functions 3 August 23rd 05 11:28 AM
A function that returns the name of the current cell yarp Excel Discussion (Misc queries) 17 August 9th 05 09:44 AM
Date & Time mully New Users to Excel 4 May 23rd 05 11:56 AM
Grouped Sheets and Formating Pank Mehta Excel Discussion (Misc queries) 3 March 24th 05 01:42 AM
Grand Totals @ Same Place Amber M Excel Worksheet Functions 2 December 30th 04 07:13 PM


All times are GMT +1. The time now is 10:26 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"