close

I need help with a formula. I'm creating a spreadsheet where data entry
would indicate the time a patient arrives and than leaves. I need a formula
that calculates this, but displays nothing if no time is entered (for example
down the worksheet).

=IF((M2-L2)=0,quot;quot;),IF((M2-L2)gt;0,quot;h:mmquot;)

This is what I have...I keep getting value error.

i want the time to display if the time is greater than zero, but if less
than zero, display nothing.

Thanks,

Cyrus

Maybe

=IF(OR(M2=quot;quot;,L2=quot;quot;),quot;quot;,IF(M2-L2gt;0,M2-L2,quot;quot;))--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

quot;Cyrusquot; gt; wrote in message
...
gt; I need help with a formula. I'm creating a spreadsheet where data entry
gt; would indicate the time a patient arrives and than leaves. I need a
formula
gt; that calculates this, but displays nothing if no time is entered (for
example
gt; down the worksheet).
gt;
gt; =IF((M2-L2)=0,quot;quot;),IF((M2-L2)gt;0,quot;h:mmquot;)
gt;
gt; This is what I have...I keep getting value error.
gt;
gt; i want the time to display if the time is greater than zero, but if less
gt; than zero, display nothing.
gt;
gt; Thanks,
gt;
gt; Cyrus
=TEXT(IF(M2-L2gt;0,M2-L2,quot;quot;),quot;h:mmquot;)

Vaya con Dios,
Chuck, CABGx3
quot;Cyrusquot; wrote:

gt; I need help with a formula. I'm creating a spreadsheet where data entry
gt; would indicate the time a patient arrives and than leaves. I need a formula
gt; that calculates this, but displays nothing if no time is entered (for example
gt; down the worksheet).
gt;
gt; =IF((M2-L2)=0,quot;quot;),IF((M2-L2)gt;0,quot;h:mmquot;)
gt;
gt; This is what I have...I keep getting value error.
gt;
gt; i want the time to display if the time is greater than zero, but if less
gt; than zero, display nothing.
gt;
gt; Thanks,
gt;
gt; Cyrus

=TEXT(MAX(M2-L2,0),quot;h:mm;;quot;)quot;Cyrusquot; wrote:

gt; I need help with a formula. I'm creating a spreadsheet where data entry
gt; would indicate the time a patient arrives and than leaves. I need a formula
gt; that calculates this, but displays nothing if no time is entered (for example
gt; down the worksheet).
gt;
gt; =IF((M2-L2)=0,quot;quot;),IF((M2-L2)gt;0,quot;h:mmquot;)
gt;
gt; This is what I have...I keep getting value error.
gt;
gt; i want the time to display if the time is greater than zero, but if less
gt; than zero, display nothing.
gt;
gt; Thanks,
gt;
gt; Cyrus

Cyrus,

Try:

=IF(M2gt;L2,M2-L2,quot;quot;)

With that formula, you will get a value if you have a departure time but no
arrival time. If that is a potential problem, use:

=IF((M2-L2)*L2gt;0,M2-L2,quot;quot;)In both cases, format the cell as time. If elapsed time may exceed 12
hours, use the custom number format [h]:mmTim Cquot;Cyrusquot; gt; wrote in message
...
gt;I need help with a formula. I'm creating a spreadsheet where data entry
gt; would indicate the time a patient arrives and than leaves. I need a
gt; formula
gt; that calculates this, but displays nothing if no time is entered (for
gt; example
gt; down the worksheet).
gt;
gt; =IF((M2-L2)=0,quot;quot;),IF((M2-L2)gt;0,quot;h:mmquot;)
gt;
gt; This is what I have...I keep getting value error.
gt;
gt; i want the time to display if the time is greater than zero, but if less
gt; than zero, display nothing.
gt;
gt; Thanks,
gt;
gt; Cyrus
It worked!!! Thanks so much!!!

Cyrus

quot;CLRquot; wrote:

gt; =TEXT(IF(M2-L2gt;0,M2-L2,quot;quot;),quot;h:mmquot;)
gt;
gt; Vaya con Dios,
gt; Chuck, CABGx3
gt;
gt;
gt;
gt; quot;Cyrusquot; wrote:
gt;
gt; gt; I need help with a formula. I'm creating a spreadsheet where data entry
gt; gt; would indicate the time a patient arrives and than leaves. I need a formula
gt; gt; that calculates this, but displays nothing if no time is entered (for example
gt; gt; down the worksheet).
gt; gt;
gt; gt; =IF((M2-L2)=0,quot;quot;),IF((M2-L2)gt;0,quot;h:mmquot;)
gt; gt;
gt; gt; This is what I have...I keep getting value error.
gt; gt;
gt; gt; i want the time to display if the time is greater than zero, but if less
gt; gt; than zero, display nothing.
gt; gt;
gt; gt; Thanks,
gt; gt;
gt; gt; Cyrus

arrow
arrow
    全站熱搜
    創作者介紹
    創作者 software 的頭像
    software

    software

    software 發表在 痞客邦 留言(0) 人氣()