Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default Avoiding Value error message due to space in cell w/ formula

I have a time sheet in Excel that will be used by nearly 1000 employees. I'm
trying to make it both user friendly and foolproof. Currently, I have cells
for time in and out and then a cell that calculates the time worked. If
someone clears the "In" or "Out" cell with the space bar, the formula cell
returns a Value error message. How can I avoid this? Here's my formula:
=ROUND((SUM((((C16-B16)+(B16C16))*1440)/60)+(((E16-D16)+(D16E16))*1440/60))/0.25,0)*0.25

Thanks for any help correcting this or if you have suggestions regarding the
time formula I am very grateful.
A.R. Hunt
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 733
Default Avoiding Value error message due to space in cell w/ formula

A.R. Hunt <A.R. wrote...
I have a time sheet in Excel that will be used by nearly 1000 employees. I'm
trying to make it both user friendly and foolproof. Currently, I have cells
for time in and out and then a cell that calculates the time worked. If
someone clears the "In" or "Out" cell with the space bar, the formula cell
returns a Value error message. How can I avoid this? Here's my formula:
=ROUND((SUM((((C16-B16)+(B16C16))*1440)/60)
+(((E16-D16)+(D16E16))*1440/60))/0.25,0)*0.25

....

So you're rounding to quarter hours? Easier to multiply by 96 (24*4)
than by 1440*60/0.25, 96 being no more obscure than 1440. Eliminate the
unnecessary SUM call and parentheses. Try

=ROUND((N(C16)-N(B16)+(B16C16)+N(E16)-N(D16)+(D16E16))*96,0)/4

N(.) returns 0 if its argument evaluates to text, FALSE or refers to a
blank cell. It'll only return nonzero numbers when its argument
evaluates to a number or TRUE, in which case it returns 1.

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 347
Default Avoiding Value error message due to space in cell w/ formula

Hi,

One way:

=IF(ISERROR(ROUND((SUM((((C16-B16)+(B16C16))*1440)/60)+(((E16-D16)+(D16E16))*1440/60))/0.25,0)*0.25
),"",ROUND((SUM((((C16-B16)+(B16C16))*1440)/60)+(((E16-D16)+(D16E16))*1440/60))/0.25,0)*0.25
)

HTH
Jean-Guy

"A.R. Hunt" wrote:

I have a time sheet in Excel that will be used by nearly 1000 employees. I'm
trying to make it both user friendly and foolproof. Currently, I have cells
for time in and out and then a cell that calculates the time worked. If
someone clears the "In" or "Out" cell with the space bar, the formula cell
returns a Value error message. How can I avoid this? Here's my formula:
=ROUND((SUM((((C16-B16)+(B16C16))*1440)/60)+(((E16-D16)+(D16E16))*1440/60))/0.25,0)*0.25

Thanks for any help correcting this or if you have suggestions regarding the
time formula I am very grateful.
A.R. Hunt

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11
Default Avoiding Value error message due to space in cell w/ formula

Thanks! This seems to have fixed my problem. Thanks also for helping with the
time formula. I'd modified a formula from another thread here and was afraid
to make changes. Since I wasn't sure I understood all the arguments, I
figured I better use it pretty much as it was.

"Harlan Grove" wrote:

A.R. Hunt <A.R. wrote...
I have a time sheet in Excel that will be used by nearly 1000 employees. I'm
trying to make it both user friendly and foolproof. Currently, I have cells
for time in and out and then a cell that calculates the time worked. If
someone clears the "In" or "Out" cell with the space bar, the formula cell
returns a Value error message. How can I avoid this? Here's my formula:
=ROUND((SUM((((C16-B16)+(B16C16))*1440)/60)
+(((E16-D16)+(D16E16))*1440/60))/0.25,0)*0.25

....

So you're rounding to quarter hours? Easier to multiply by 96 (24*4)
than by 1440*60/0.25, 96 being no more obscure than 1440. Eliminate the
unnecessary SUM call and parentheses. Try

=ROUND((N(C16)-N(B16)+(B16C16)+N(E16)-N(D16)+(D16E16))*96,0)/4

N(.) returns 0 if its argument evaluates to text, FALSE or refers to a
blank cell. It'll only return nonzero numbers when its argument
evaluates to a number or TRUE, in which case it returns 1.


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
Is it possible? DakotaNJ Excel Worksheet Functions 25 September 18th 06 09:30 PM
Reusing formula Tony29 Excel Discussion (Misc queries) 7 September 7th 06 03:34 AM
Custom functions calculating time arguments Help Desperate Bill_De Excel Worksheet Functions 12 April 25th 06 02:22 AM
Text in formula bar is not displaying in cell Mike Excel Discussion (Misc queries) 0 August 29th 05 09:47 PM
Possible Lookup Table Karen Excel Worksheet Functions 5 June 8th 05 09:43 PM


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