Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Steve
 
Posts: n/a
Default Separating data ( 1 time range) in one column

I have the following cell:
0800-1000

I need to ref 0800 in one column & 1000 in another, to ultimately subtract
0800 from 1000 to get 2 hours.

What function would do that ?

Thanks,

Steve



  #2   Report Post  
Peo Sjoblom
 
Posts: n/a
Default

Why making it so hard? Why not use sense and use 2 cells and

08:00 and 10:00

then you can just use

=B1-A1

assuming B1 holds 10:00 and A1 08:00
of course if you are the receiver of a sheet that comes like that it aint
much to do

if the times can go after midnight like

1930-0230

=MOD((INT(RIGHT(A1,4)/100)+MOD(RIGHT(A1,4),100)/60)/24-(INT(LEFT(A1,4)/100)+MOD(LEFT(A1,4),100)/60)/24,1)

if not


=TEXT(RIGHT(A1,4),"00\:00")-TEXT(LEFT(A1,4),"00\:00")


format as hh:mm


Regards,

Peo Sjoblom



"Steve" wrote:

I have the following cell:
0800-1000

I need to ref 0800 in one column & 1000 in another, to ultimately subtract
0800 from 1000 to get 2 hours.

What function would do that ?

Thanks,

Steve



  #3   Report Post  
Steve
 
Posts: n/a
Default

Thanks,

Yes, the data was imported into that cell as 0800-1000, so I'll need to use
your latter suggestions.

Thanks again,

Steve

"Peo Sjoblom" wrote:

Why making it so hard? Why not use sense and use 2 cells and

08:00 and 10:00

then you can just use

=B1-A1

assuming B1 holds 10:00 and A1 08:00
of course if you are the receiver of a sheet that comes like that it aint
much to do

if the times can go after midnight like

1930-0230

=MOD((INT(RIGHT(A1,4)/100)+MOD(RIGHT(A1,4),100)/60)/24-(INT(LEFT(A1,4)/100)+MOD(LEFT(A1,4),100)/60)/24,1)

if not


=TEXT(RIGHT(A1,4),"00\:00")-TEXT(LEFT(A1,4),"00\:00")


format as hh:mm


Regards,

Peo Sjoblom



"Steve" wrote:

I have the following cell:
0800-1000

I need to ref 0800 in one column & 1000 in another, to ultimately subtract
0800 from 1000 to get 2 hours.

What function would do that ?

Thanks,

Steve



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
Pulling data from 1 sheet to another Dave1155 Excel Worksheet Functions 1 January 12th 05 05:55 PM
Vlookup of parts of a word in a range of Data Andre Croteau Excel Discussion (Misc queries) 3 December 19th 04 07:26 PM
time formatting and time categorizing (vlookup or data validation) MarianneR Excel Worksheet Functions 4 November 18th 04 03:24 PM
Can you average data in 1 column based on a range of values in another? kman24 Excel Worksheet Functions 2 November 17th 04 02:09 PM
How to calculate the data in excel 2002 including only the last 9. TylerMaricich Excel Worksheet Functions 6 November 8th 04 07:27 AM


All times are GMT +1. The time now is 12:26 AM.

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"