close

Hello all,

I am having a bit of trouble with trying to use the IF Statement in
Excel when it comes to TIME.

This is what I am trying to do:

In Cell G3, it calculates minutes elapsed by using the following:

=TEXT(D3-C3, quot;h:mm:ssquot;)

In Cell H3, I am trying to make it so that if Cell G3 is more than 7
Minutes, it writes quot;NOquot;, and if the same cell is Less or Equal to 7, it
writes quot;YESquot;

Here is what I have in Cell H3:

=IF('7 or Less Articles'!G3gt;7,quot;Noquot;,IF('7 or Less
Articles'!G3lt;=7,quot;Yesquot;))

To make a long story short, it's not calculating properly.

Cell D3 is 9:03
Cell D3 is 9:00

9:03 minus 9:00 is 3 minutes, therefore Cell H3 should say quot;YESquot; -
instead it's saying quot;NOquot; I've been at this for several days trying to
find a solution.

I will appreciative of any help someone can provide.
Hi Roland,

While I have not tested it - I think the problem may be that Cell G3 is
formatted as text. Excel cannot calculate numerical functions on a text
string.

Try creating a cell that has -

=VALUE(G3)

This should return a serial value for the time. Then just change the
formatting of the cell.

Then in H3 change the references to G3, to the new cell you have
created.

I don't think you will need to....but you may need to get the serial
value of '7' - and with the formula in H3 use the serial value instead
of the number '7'.

Hope this helps.

Regards

Rob--
systemx
------------------------------------------------------------------------
systemx's Profile: www.excelforum.com/member.php...oamp;userid=29254
View this thread: www.excelforum.com/showthread...hreadid=539482
Sorry mate...rethought my original post.

In your IF statement in H3...just put inverted commas either side of
7....

eg IF('7 or Less Articles'!G3gt;quot;7quot;,quot;Noquot;,IF('7 or Less
Articles'!G3lt;=quot;7quot;,quot;Yesquot;))

That should fix it up --
systemx
------------------------------------------------------------------------
systemx's Profile: www.excelforum.com/member.php...oamp;userid=29254
View this thread: www.excelforum.com/showthread...hreadid=539482Hi!

Try this:

=IF(COUNT(C33)=2,IF(--G3gt;TIME(0,7,0),quot;Noquot;,IF(--G3lt;=TIME(0,7,0),quot;Yesquot;)),quot;quot;)

Biff

gt; wrote in message oups.com...
gt; Hello all,
gt;
gt; I am having a bit of trouble with trying to use the IF Statement in
gt; Excel when it comes to TIME.
gt;
gt; This is what I am trying to do:
gt;
gt; In Cell G3, it calculates minutes elapsed by using the following:
gt;
gt; =TEXT(D3-C3, quot;h:mm:ssquot;)
gt;
gt; In Cell H3, I am trying to make it so that if Cell G3 is more than 7
gt; Minutes, it writes quot;NOquot;, and if the same cell is Less or Equal to 7, it
gt; writes quot;YESquot;
gt;
gt; Here is what I have in Cell H3:
gt;
gt; =IF('7 or Less Articles'!G3gt;7,quot;Noquot;,IF('7 or Less
gt; Articles'!G3lt;=7,quot;Yesquot;))
gt;
gt; To make a long story short, it's not calculating properly.
gt;
gt; Cell D3 is 9:03
gt; Cell D3 is 9:00
gt;
gt; 9:03 minus 9:00 is 3 minutes, therefore Cell H3 should say quot;YESquot; -
gt; instead it's saying quot;NOquot; I've been at this for several days trying to
gt; find a solution.
gt;
gt; I will appreciative of any help someone can provide.
gt;
You can probably even go with this:

=IF(COUNT(C33)=2,IF(--G3gt;TIME(0,7,0),quot;Noquot;,quot;Yesquot;),quot;quot;)

If G3 is not gt;quot;7quot; then it has to be lt;=quot;7quot; *unless* D3 lt; C3 in which case the
formula in G3 will return an error and this will propagate to H3.

Biff

quot;Biffquot; gt; wrote in message
...
gt; Hi!
gt;
gt; Try this:
gt;
gt; =IF(COUNT(C33)=2,IF(--G3gt;TIME(0,7,0),quot;Noquot;,IF(--G3lt;=TIME(0,7,0),quot;Yesquot;)),quot;quot;)
gt;
gt; Biff
gt;
gt; gt; wrote in message
gt; oups.com...
gt;gt; Hello all,
gt;gt;
gt;gt; I am having a bit of trouble with trying to use the IF Statement in
gt;gt; Excel when it comes to TIME.
gt;gt;
gt;gt; This is what I am trying to do:
gt;gt;
gt;gt; In Cell G3, it calculates minutes elapsed by using the following:
gt;gt;
gt;gt; =TEXT(D3-C3, quot;h:mm:ssquot;)
gt;gt;
gt;gt; In Cell H3, I am trying to make it so that if Cell G3 is more than 7
gt;gt; Minutes, it writes quot;NOquot;, and if the same cell is Less or Equal to 7, it
gt;gt; writes quot;YESquot;
gt;gt;
gt;gt; Here is what I have in Cell H3:
gt;gt;
gt;gt; =IF('7 or Less Articles'!G3gt;7,quot;Noquot;,IF('7 or Less
gt;gt; Articles'!G3lt;=7,quot;Yesquot;))
gt;gt;
gt;gt; To make a long story short, it's not calculating properly.
gt;gt;
gt;gt; Cell D3 is 9:03
gt;gt; Cell D3 is 9:00
gt;gt;
gt;gt; 9:03 minus 9:00 is 3 minutes, therefore Cell H3 should say quot;YESquot; -
gt;gt; instead it's saying quot;NOquot; I've been at this for several days trying to
gt;gt; find a solution.
gt;gt;
gt;gt; I will appreciative of any help someone can provide.
gt;gt;
gt;
gt;

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

    software

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