#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 244
Default "IF" syntax

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

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default "IF" syntax

=max(D7:E7)+TimeValue("00:00:20")

--
Regards,
Tom Ogilvy

"Chris" wrote in message
...
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



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 16
Default "IF" syntax


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


-----Original Message-----
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

.

  #4   Report Post  
Posted to microsoft.public.excel.programming
No Name
 
Posts: n/a
Default "IF" syntax

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

-----Original Message-----

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


-----Original Message-----
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

.

.

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default "IF" syntax

=IF(D7E7,D7,E7)+TIME(0,0,20)
Assuming D7 and E7 are stored as time and not text.

wrote in message
...
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

-----Original Message-----

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


-----Original Message-----
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

.

.





  #6   Report Post  
Posted to microsoft.public.excel.programming
No Name
 
Posts: n/a
Default "IF" syntax

That's it! I can't believe I did something that stupid!
I stored the values as "text" and not "Time"
Thanks!!!
Chris
-----Original Message-----
=IF(D7E7,D7,E7)+TIME(0,0,20)
Assuming D7 and E7 are stored as time and not text.

wrote in message
...
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

-----Original Message-----

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


-----Original Message-----
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

.

.



.

  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default "IF" syntax

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

--
Regards,
Tom Ogilvy


wrote in message
...
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

-----Original Message-----

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


-----Original Message-----
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

.

.



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
correct syntax for nesting "if", "and", and "vlookup"....if possib Christine Excel Worksheet Functions 4 January 2nd 09 10:43 PM
Excel - Golf - how to display "-2" as "2 Under" or "4"as "+4" or "4 Over" in a calculation cell Steve Kay Excel Discussion (Misc queries) 2 August 8th 08 01:54 AM
syntax for "IF" commend to check for multiple empty cells bf comma Chris Excel Worksheet Functions 4 September 3rd 07 12:02 PM
Syntax to "OR" 3 "ISERROR" conditions Mike K Excel Worksheet Functions 6 July 22nd 06 04:18 PM
what is syntax for if(between range of dates,"Q1","Q2")? TLB Excel Worksheet Functions 3 December 6th 05 05:19 PM


All times are GMT +1. The time now is 06:33 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"