Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,059
Default Time Calculation returning 19:00

"default time to PM after 12:00 pm"
. com wrote:
I'm trying to calculate the hh:mm difference between two cells
and asking to do nothing if W1 is blank. Why am I getting 19:00
as a value from a calculation of:
=IF(W1<X1,X1-W1,IF(W1="","",IF(W1X1,"","")))


I haven't a clue, since your posting does not tell us what is in W1 and X1.
Why shouldn't the formula return 19:00?

But here are some tweaks that you should consider for your formula. It
might solve the problem coincidentally.

First, if W1 is empty (not ""), your formula will return X1 because W1<X1 is
true. I suspect that is not what you want.

Second, the last term (if W1X1,...) is superfluous, albeit not harmful.

Third, you assume that X1 cannot be empty or null text (""). Is that a
valid assumption?

At a minimum, try:

=if(and(W1<"",W1<X1),X1-W1,"")

Alternatively:

=if(and(W1<"",X1<"",W1<X1),X1-W1,"")

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
Returning calculation status Phil H Excel Worksheet Functions 1 August 14th 08 06:03 PM
returning calculation based on number byrddog75 Excel Worksheet Functions 3 July 8th 08 05:09 PM
Stop time - start time calculation squack21 Excel Worksheet Functions 5 December 10th 07 03:20 PM
Nested If statements returning a sum calculation arkage Excel Worksheet Functions 1 April 20th 07 08:59 PM
Time calculation (Subraction of Idle Time) Ajay Excel Discussion (Misc queries) 6 March 4th 07 11:54 AM


All times are GMT +1. The time now is 01:04 PM.

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"