Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 4
Default Change number format with IF statement

Hi,
I am trying to change the way excel displays times based on the value of a
cell.

Example: If a cell is custom formatted to show m:ss.00, I am trying to find
a way to say

IF 9:59.99 THEN format = mm:ss.00

Mostly I am trying to get rid of unwanted zeros to make it easier to read
such that

00:15.25 displays as 15.25
03:15.25 displays as 3:15.25
34:15.25 displays as 34:15.25 (i.e unchanged)

Ideally I want to apply a single formula to all cells.

Your help is appreciated.

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 4
Default Change number format with IF statement

Thanks for your help,

Am I right in thinking that this method removes the number formatting? If
so I will be unable to perform numerical operations such as MIN or LARGE?

"Teethless mama" wrote:

=IF(A2<--"0:1:00",TEXT(A2,"ss.00"),TEXT(A2,"m:ss.00"))


"Time Bandit" wrote:

Hi,
I am trying to change the way excel displays times based on the value of a
cell.

Example: If a cell is custom formatted to show m:ss.00, I am trying to find
a way to say

IF 9:59.99 THEN format = mm:ss.00

Mostly I am trying to get rid of unwanted zeros to make it easier to read
such that

00:15.25 displays as 15.25
03:15.25 displays as 3:15.25
34:15.25 displays as 34:15.25 (i.e unchanged)

Ideally I want to apply a single formula to all cells.

Your help is appreciated.

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 4
Default Change number format with IF statement

Thanks again,

I have a new problem - SUM and AVERAGE give inconsistant results when
applied to cells with these different formats.

I have found however that if I format all cells as m.ss.00, minutes larger
than 10 are accommodated. As I am unlikely to neeed to use hours this may be
an acceptable compromise

"Teethless mama" wrote:

Yes, and Yes. If you want to calculate with another function then try this:

=IF(A2<--"0:1:00",--TEXT(A2,"ss.00"),--TEXT(A2,"m:ss.00")

the format won't always be the same as you described above


"Time Bandit" wrote:

Thanks for your help,

Am I right in thinking that this method removes the number formatting? If
so I will be unable to perform numerical operations such as MIN or LARGE?

"Teethless mama" wrote:

=IF(A2<--"0:1:00",TEXT(A2,"ss.00"),TEXT(A2,"m:ss.00"))


"Time Bandit" wrote:

Hi,
I am trying to change the way excel displays times based on the value of a
cell.

Example: If a cell is custom formatted to show m:ss.00, I am trying to find
a way to say

IF 9:59.99 THEN format = mm:ss.00

Mostly I am trying to get rid of unwanted zeros to make it easier to read
such that

00:15.25 displays as 15.25
03:15.25 displays as 3:15.25
34:15.25 displays as 34:15.25 (i.e unchanged)

Ideally I want to apply a single formula to all cells.

Your help is appreciated.

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,718
Default Change number format with IF statement

Yes, and Yes. If you want to calculate with another function then try this:

=IF(A2<--"0:1:00",--TEXT(A2,"ss.00"),--TEXT(A2,"m:ss.00")

the format won't always be the same as you described above


"Time Bandit" wrote:

Thanks for your help,

Am I right in thinking that this method removes the number formatting? If
so I will be unable to perform numerical operations such as MIN or LARGE?

"Teethless mama" wrote:

=IF(A2<--"0:1:00",TEXT(A2,"ss.00"),TEXT(A2,"m:ss.00"))


"Time Bandit" wrote:

Hi,
I am trying to change the way excel displays times based on the value of a
cell.

Example: If a cell is custom formatted to show m:ss.00, I am trying to find
a way to say

IF 9:59.99 THEN format = mm:ss.00

Mostly I am trying to get rid of unwanted zeros to make it easier to read
such that

00:15.25 displays as 15.25
03:15.25 displays as 3:15.25
34:15.25 displays as 34:15.25 (i.e unchanged)

Ideally I want to apply a single formula to all cells.

Your help is appreciated.

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 340
Default Change number format with IF statement

Instead of a formula you could use a custom number format:

[=0 1/1440]m:ss.00;ss.00

then calculations should work fine as this only changes the way the
number is displayed. Or you could use the formula

= TEXT(A2,"[=0 1/1440]m:ss.00;ss.00")

Note: "0 1/1440" is a fraction representing 1/(24*60) of a day i.e. 1
minute.

On Feb 15, 3:44 pm, Time Bandit wrote:
Thanks again,

I have a new problem - SUM and AVERAGE give inconsistant results when
applied to cells with these different formats.

I have found however that if I format all cells as m.ss.00, minutes larger
than 10 are accommodated. As I am unlikely to neeed to use hours this may be
an acceptable compromise

"Teethless mama" wrote:
Yes, and Yes. If you want to calculate with another function then try this:


=IF(A2<--"0:1:00",--TEXT(A2,"ss.00"),--TEXT(A2,"m:ss.00")


the format won't always be the same as you described above


"Time Bandit" wrote:


Thanks for your help,


Am I right in thinking that this method removes the number formatting? If
so I will be unable to perform numerical operations such as MIN or LARGE?


"Teethless mama" wrote:


=IF(A2<--"0:1:00",TEXT(A2,"ss.00"),TEXT(A2,"m:ss.00"))


"Time Bandit" wrote:


Hi,
I am trying to change the way excel displays times based on the value of a
cell.


Example: If a cell is custom formatted to show m:ss.00, I am trying to find
a way to say


IF 9:59.99 THEN format = mm:ss.00


Mostly I am trying to get rid of unwanted zeros to make it easier to read
such that


00:15.25 displays as 15.25
03:15.25 displays as 3:15.25
34:15.25 displays as 34:15.25 (i.e unchanged)


Ideally I want to apply a single formula to all cells.


Your help is appreciated.





  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 4
Default Change number format with IF statement

Thanks for that one,

Is the "0" in "0 1/1440" a placeholder for "0" days?

It strikes me that there are a lot of queries regarding the way that excel
handles times and that the implementation makes it hard work for some
relatively simple requirements i.e. performing basic opertions and choosing
display options.

"Lori" wrote:

Instead of a formula you could use a custom number format:

[=0 1/1440]m:ss.00;ss.00

then calculations should work fine as this only changes the way the
number is displayed. Or you could use the formula

= TEXT(A2,"[=0 1/1440]m:ss.00;ss.00")

Note: "0 1/1440" is a fraction representing 1/(24*60) of a day i.e. 1
minute.

On Feb 15, 3:44 pm, Time Bandit wrote:
Thanks again,

I have a new problem - SUM and AVERAGE give inconsistant results when
applied to cells with these different formats.

I have found however that if I format all cells as m.ss.00, minutes larger
than 10 are accommodated. As I am unlikely to neeed to use hours this may be
an acceptable compromise

"Teethless mama" wrote:
Yes, and Yes. If you want to calculate with another function then try this:


=IF(A2<--"0:1:00",--TEXT(A2,"ss.00"),--TEXT(A2,"m:ss.00")


the format won't always be the same as you described above


"Time Bandit" wrote:


Thanks for your help,


Am I right in thinking that this method removes the number formatting? If
so I will be unable to perform numerical operations such as MIN or LARGE?


"Teethless mama" wrote:


=IF(A2<--"0:1:00",TEXT(A2,"ss.00"),TEXT(A2,"m:ss.00"))


"Time Bandit" wrote:


Hi,
I am trying to change the way excel displays times based on the value of a
cell.


Example: If a cell is custom formatted to show m:ss.00, I am trying to find
a way to say


IF 9:59.99 THEN format = mm:ss.00


Mostly I am trying to get rid of unwanted zeros to make it easier to read
such that


00:15.25 displays as 15.25
03:15.25 displays as 3:15.25
34:15.25 displays as 34:15.25 (i.e unchanged)


Ideally I want to apply a single formula to all cells.


Your help is appreciated.




  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 340
Default Change number format with IF statement

Excel doesn't recognise 1/1440, it tries to convert it to a date and
then when that fails interprets it as text, so you need to prefix by
"0 " since fractions are stored in the format "a b/c".

On Feb 16, 9:52 am, Time Bandit wrote:
Thanks for that one,

Is the "0" in "0 1/1440" a placeholder for "0" days?

It strikes me that there are a lot of queries regarding the way that excel
handles times and that the implementation makes it hard work for some
relatively simple requirements i.e. performing basic opertions and choosing
display options.

"Lori" wrote:
Instead of a formula you could use a custom number format:


[=0 1/1440]m:ss.00;ss.00


then calculations should work fine as this only changes the way the
number is displayed. Or you could use the formula


= TEXT(A2,"[=0 1/1440]m:ss.00;ss.00")


Note: "0 1/1440" is a fraction representing 1/(24*60) of a day i.e. 1
minute.


On Feb 15, 3:44 pm, Time Bandit wrote:
Thanks again,


I have a new problem - SUM and AVERAGE give inconsistant results when
applied to cells with these different formats.


I have found however that if I format all cells as m.ss.00, minutes larger
than 10 are accommodated. As I am unlikely to neeed to use hours this may be
an acceptable compromise


"Teethless mama" wrote:
Yes, and Yes. If you want to calculate with another function then try this:


=IF(A2<--"0:1:00",--TEXT(A2,"ss.00"),--TEXT(A2,"m:ss.00")


the format won't always be the same as you described above


"Time Bandit" wrote:


Thanks for your help,


Am I right in thinking that this method removes the number formatting? If
so I will be unable to perform numerical operations such as MIN or LARGE?


"Teethless mama" wrote:


=IF(A2<--"0:1:00",TEXT(A2,"ss.00"),TEXT(A2,"m:ss.00"))


"Time Bandit" wrote:


Hi,
I am trying to change the way excel displays times based on the value of a
cell.


Example: If a cell is custom formatted to show m:ss.00, I am trying to find
a way to say


IF 9:59.99 THEN format = mm:ss.00


Mostly I am trying to get rid of unwanted zeros to make it easier to read
such that


00:15.25 displays as 15.25
03:15.25 displays as 3:15.25
34:15.25 displays as 34:15.25 (i.e unchanged)


Ideally I want to apply a single formula to all cells.


Your help is appreciated.



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
Change number format with IF statement Teethless mama Excel Worksheet Functions 0 February 15th 07 02:43 PM
Change number (in text format) to numeric format Pam Excel Discussion (Misc queries) 5 October 24th 05 07:45 PM
Hoe to change text format .126 to number format 0.126 vitality Excel Discussion (Misc queries) 3 October 6th 05 01:31 PM
How to change text format .126 to number format 0.126 ? vitality Excel Worksheet Functions 2 October 6th 05 01:02 PM
How do i change numbers in text format to number format? Greg New Users to Excel 1 December 14th 04 05:22 PM


All times are GMT +1. The time now is 07:24 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"