Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Mike
 
Posts: n/a
Default Show missing data as 0

My data has days hours minutes in cell E2. 3d 04h 58m
I use the following to convert it to hours:
=LEFT(E2,FIND("d",E2)-1)*24+MID(E2,FIND("h",E2)-2,2)+MID(E2,FIND("m",E2)-2,2)/60
It work fine until I get a unit without the day. 04h 58m. Can I use a if
statement to add all numbers even if the day value is missing?
  #2   Report Post  
JulieD
 
Posts: n/a
Default

Hi Mike

try
=IF(iserror(FIND("d",E2)),0,LEFT(E2,FIND("d",E2)-1)*24)+MID(E2,FIND("h",E2)-2,2)+MID(E2,FIND("m",E2)-2,2)/60

Cheers
JulieD

"Mike" wrote in message
...
My data has days hours minutes in cell E2. 3d 04h 58m
I use the following to convert it to hours:
=LEFT(E2,FIND("d",E2)-1)*24+MID(E2,FIND("h",E2)-2,2)+MID(E2,FIND("m",E2)-2,2)/60
It work fine until I get a unit without the day. 04h 58m. Can I use a if
statement to add all numbers even if the day value is missing?



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

Maybe something like

=IF(ISNUMBER(FIND("d",E3)),"your
formula",24*(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(E3," h",":"),"m","")," ","")))


--

Regards,

Peo Sjoblom


"Mike" wrote in message
...
My data has days hours minutes in cell E2. 3d 04h 58m
I use the following to convert it to hours:

=LEFT(E2,FIND("d",E2)-1)*24+MID(E2,FIND("h",E2)-2,2)+MID(E2,FIND("m",E2)-2,2
)/60
It work fine until I get a unit without the day. 04h 58m. Can I use a if
statement to add all numbers even if the day value is missing?



  #4   Report Post  
Mike
 
Posts: n/a
Default

It works great... Thanks Julie!!

"JulieD" wrote:

Hi Mike

try
=IF(iserror(FIND("d",E2)),0,LEFT(E2,FIND("d",E2)-1)*24)+MID(E2,FIND("h",E2)-2,2)+MID(E2,FIND("m",E2)-2,2)/60

Cheers
JulieD

"Mike" wrote in message
...
My data has days hours minutes in cell E2. 3d 04h 58m
I use the following to convert it to hours:
=LEFT(E2,FIND("d",E2)-1)*24+MID(E2,FIND("h",E2)-2,2)+MID(E2,FIND("m",E2)-2,2)/60
It work fine until I get a unit without the day. 04h 58m. Can I use a if
statement to add all numbers even if the day value is missing?




  #5   Report Post  
JulieD
 
Posts: n/a
Default

you're welcome and thanks for the feedback

"Mike" wrote in message
...
It works great... Thanks Julie!!

"JulieD" wrote:

Hi Mike

try
=IF(iserror(FIND("d",E2)),0,LEFT(E2,FIND("d",E2)-1)*24)+MID(E2,FIND("h",E2)-2,2)+MID(E2,FIND("m",E2)-2,2)/60

Cheers
JulieD

"Mike" wrote in message
...
My data has days hours minutes in cell E2. 3d 04h 58m
I use the following to convert it to hours:
=LEFT(E2,FIND("d",E2)-1)*24+MID(E2,FIND("h",E2)-2,2)+MID(E2,FIND("m",E2)-2,2)/60
It work fine until I get a unit without the day. 04h 58m. Can I use a
if
statement to add all numbers even if the day value is missing?






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
missing data from table kg1953 Excel Discussion (Misc queries) 1 February 2nd 05 05:11 PM
missing data from table kg1953 Excel Discussion (Misc queries) 0 February 2nd 05 04:59 PM
Help with data not getting plotted Scott Ehrlich Excel Discussion (Misc queries) 2 January 25th 05 05:17 AM
Help with data not getting plotted Scott Ehrlich Charts and Charting in Excel 1 January 23rd 05 05:15 PM
Pulling data from 1 sheet to another Dave1155 Excel Worksheet Functions 1 January 12th 05 05:55 PM


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