"IF" syntax

  • Thread starter Thread starter Chris
  • Start date Start date
C

Chris

I need some help using "IF" syntax in Excel "97."
I want to compare the value(values are minutes&seconds) in
one cell with another cell
and depending on which cell has the greater value I would
like value displayed in a cell.
Example:

Cell D7 Cell E7
33:15 32:05

Cell C7 should display the greater of the two values.
I would also like Cell C7 to add 20 seconds to the
inserted value. I just can't figure this out; here is the
formula I created
=IF(D7<E7,D7,E7)+20
But it doesn't work.

Chris
 
Your If is ok. To add the 20 seconds, type 0:20 into a
separate cell and add the cell reference to the formula.

For example, put 0:20 in G1 then use the formula:
=IF(D7<E7,D7,E7)+$G$1

HTH
Helen
 
I have received 4 different formulas from 4 different
people and none have worked so far. I'm beating my head
off the wall! I've gone through the help menu and the
book but I still can't get this to work. It would seem
like a simple enough formula. Guess not.
I hate office "97"!
Anyone have any ideas?

Chris
 
That's it! I can't believe I did something that stupid!
I stored the values as "text" and not "Time"
Thanks!!!
Chris
 
If the formula I gave you doesn't work, then the cells are not storing time
values or they are storing the wrong values or you don't have the cell
formatted properly.

(1) in another cell put in the formula

=isNumber(D7)
and in another
=IsNumber(E7)

(2) If it passes that test, then it is probable that the cells are not
storing minutes and seconds as you think, If you just went to the cell and
put in

33:15

then you entered 33 hours and 15 minutes rather than 33 minutes and 15
seconds.

You can check with another cell using

=DAY(D7)*24+HOUR(D7) & " " & MINUTE(D7) & " " & SECOND(D7)

if it show 0 33 15, then you are OK. If it shows 33 15 0 then you have
hours and minutes.

To enter 33 minutes and 15 seconds you need to enter 0:33:15

(3) Also, to see minutes in a cell with the formula you need to format it as
[mm]:ss
Format=>Cells=>Number Tab, go to custom and type in [mm]:ss
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top