Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 9
Default Extact minutes from text field?

Hi,

I have data in the follwing format in one cell: 0d 0h 13m and I need
to display only minutes and then if amout of minutes greater than 15,
color in red.

I tried:

TEXT('Historic Data'!H11,"h"" hr"" m"" min""")

and

TIME(HOUR('MyTab'!H11), MINUTE('MyTab'!H11), 0)


they will both display hr and min.

If I try:

TEXT('Historic Data'!H11," m"" min""") instead of 13 min, I get 1 min.

I'd really appreciate some help...

Thanks a ton,

Elena



  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 9
Default Extact minutes from text field?

This works:

=IF('MyTab'!H11TIME(23,59,59),TEXT('MyTab'!H11,"d ""d"" h""h""
m""m"""),IF('MyTab'!H11TIME(0,59,59),TEXT('MyTab' !H11,"h"" hr"" m""
min"""),MINUTE('MyTab'!H11)&" min"))

Struggling with conditional formatting though....




On Jul 13, 5:02*am, Lenchik wrote:
Hi,

I have data in the follwing format in one cell: 0d 0h 13m and I need
to display only minutes and then if amout of minutes greater than 15,
color in red.

I tried:

TEXT('Historic Data'!H11,"h"" hr"" m"" min""")

and

TIME(HOUR('MyTab'!H11), MINUTE('MyTab'!H11), 0)

they will both display hr and min.

If I try:

TEXT('Historic Data'!H11," m"" min""") instead of 13 min, I get 1 min.

I'd really appreciate some help...

Thanks a ton,

Elena


  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 287
Default Extact minutes from text field?

Here's a shorter formula


=IF('MyTab'!H11=1,INT('MyTab'!H11)&"d
","")&IF(HOUR('MyTab'!H11)0,HOUR('MyTab'!H11) &" hr
","")&MINUTE('MyTab'!H11)&" min"

For conditional formatting it's more compilcated to look at the result
generated from that formula because it's a text string so it might be prudent
to reference the original value in MyTab!H11. I presume that's a different
worksheet from where your formula is located so try naming H11, something
like Timecell and the use that name in conditional formatting, i.e. use
"formula is" with formula

=Timecell"0:15"+0

format red

"Lenchik" wrote:

This works:

=IF('MyTab'!H11TIME(23,59,59),TEXT('MyTab'!H11,"d ""d"" h""h""
m""m"""),IF('MyTab'!H11TIME(0,59,59),TEXT('MyTab' !H11,"h"" hr"" m""
min"""),MINUTE('MyTab'!H11)&" min"))

Struggling with conditional formatting though....




On Jul 13, 5:02 am, Lenchik wrote:
Hi,

I have data in the follwing format in one cell: 0d 0h 13m and I need
to display only minutes and then if amout of minutes greater than 15,
color in red.

I tried:

TEXT('Historic Data'!H11,"h"" hr"" m"" min""")

and

TIME(HOUR('MyTab'!H11), MINUTE('MyTab'!H11), 0)

they will both display hr and min.

If I try:

TEXT('Historic Data'!H11," m"" min""") instead of 13 min, I get 1 min.

I'd really appreciate some help...

Thanks a ton,

Elena



  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default Extact minutes from text field?

I have data in the follwing format in one cell: 0d 0h 13m and I need
to display only minutes and then if amout of minutes greater than 15,
color in red.


I was a little confused by your posting... you showed two different
worksheet names referencing the same cell value and it unclear where you are
at when trying to retrieve the minutes. On top of that, the various formulas
you tried seemed to be looking at things other than minutes. So, I just
address the bare essentials and you can add whatever sheet references you
need.

If your data is a **real Excel time value** simply formatted to display as
you indicated, then you can get the number of minutes using the MINUTE
function...

=MINUTE(H11)

You actually used this function in one of your TEXT function attempts, so
you apparently already know the above. This leads me to believe your data is
simply a text string and not a real Excel time value. If that is the case,
then you can get the minutes value, as text, like this...

=TRIM(LEFT(RIGHT(H11,3),2))

If, however, you want the value as a number, you can to that like this...

=--LEFT(RIGHT(H11,3),2)

using the double unary to convert the text string to a numeric value (the
TRIM function call is not necessary for this implementation as the possible
leading space for a single digit minute do not interfere with the
conversion).

Does this address what you were originally asking about?

Rick

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 9
Default Extact minutes from text field?

Thanks a million! It worked flawlessly...

On Jul 13, 7:18*am, daddylonglegs wrote:
Here's a shorter formula

=IF('MyTab'!H11=1,INT('MyTab'!H11)&"d
","")&IF(HOUR('MyTab'!H11)0,HOUR('MyTab'!H11) &" hr
","")&MINUTE('MyTab'!H11)&" min"

For conditional formatting it's more compilcated to look at the result
generated from that formula because it's a text string so it might be prudent
to reference the original value in MyTab!H11. I presume that's a different
worksheet from where your formula is located so try naming H11, something
like Timecell and the use that name in conditional formatting, i.e. use
"formula is" with formula

=Timecell"0:15"+0

format red

"Lenchik" wrote:
This works:


=IF('MyTab'!H11TIME(23,59,59),TEXT('MyTab'!H11,"d ""d"" h""h""
m""m"""),IF('MyTab'!H11TIME(0,59,59),TEXT('MyTab' !H11,"h"" hr"" m""
min"""),MINUTE('MyTab'!H11)&" min"))


Struggling with conditional formatting though....


On Jul 13, 5:02 am, Lenchik wrote:
Hi,


I have data in the follwing format in one cell: 0d 0h 13m and I need
to display only minutes and then if amout of minutes greater than 15,
color in red.


I tried:


TEXT('Historic Data'!H11,"h"" hr"" m"" min""")


and


TIME(HOUR('MyTab'!H11), MINUTE('MyTab'!H11), 0)


they will both display hr and min.


If I try:


TEXT('Historic Data'!H11," m"" min""") instead of 13 min, I get 1 min..


I'd really appreciate some help...


Thanks a ton,


Elena


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
New date based on one date field minus minutes in another field [email protected] Excel Discussion (Misc queries) 1 December 25th 07 04:05 PM
extact certain information from sheet 1 to shhet 2 columns e:e and hotlh Excel Worksheet Functions 2 November 20th 07 12:09 PM
extact text string from specific cell except three last characters markx Excel Worksheet Functions 3 October 23rd 07 02:40 PM
Trouble sorting first by a dates field and then by a text field. trainer07 Excel Discussion (Misc queries) 1 December 6th 06 12:25 AM
How to keep leading zero without changing field to text field? Deni Excel Discussion (Misc queries) 1 October 24th 05 10:48 PM


All times are GMT +1. The time now is 09:49 AM.

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"