#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 31
Default Don't want 0.00

I have a timesheet workbook.
Column N contains hours worked
Columns S-V is where I enter other types of paid leave used

I use this formula in H22 to calculate how much vacation time I used in a
pay period and it works fine with one exception:

=MAX(0,80-(SUM(N8:N12,N15:N19))-SUM(S8:V12,S15:V19))

The exception occurs if I work any total of 80 hours

Problem: with this scenario 0.00 is displayed in H22 rather than remaining
blank (I have 'Window options' 'Zero values' unchecked).

How can I keep that from happening?

--
David
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,856
Default Don't want 0.00

You could apply conditional formatting - if the cell contents are zero
then use white for the foreground colour so that it doesn't show if you
have a white background.

Hope this helps.

Pete

David wrote:
I have a timesheet workbook.
Column N contains hours worked
Columns S-V is where I enter other types of paid leave used

I use this formula in H22 to calculate how much vacation time I used in a
pay period and it works fine with one exception:

=MAX(0,80-(SUM(N8:N12,N15:N19))-SUM(S8:V12,S15:V19))

The exception occurs if I work any total of 80 hours

Problem: with this scenario 0.00 is displayed in H22 rather than remaining
blank (I have 'Window options' 'Zero values' unchecked).

How can I keep that from happening?

--
David


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 31
Default Don't want 0.00

David wrote

=MAX(0,80-(SUM(N8:N12,N15:N19))-SUM(S8:V12,S15:V19))


Actually, I had to change the formula to:
=MAX(0,40-(SUM(N7:N13))-SUM(S7:V13))+MAX(0,40-(SUM(N14:N20))-SUM(S14:V20))
because used Annual Time is calculated in seperate weeks

--
David
  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default Don't want 0.00


How about building a custom number format with "" for the zero value?


--
Barrett9699
------------------------------------------------------------------------
Barrett9699's Profile: http://www.excelforum.com/member.php...o&userid=37573
View this thread: http://www.excelforum.com/showthread...hreadid=573298

  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default Don't want 0.00


Yeah, select cell H22, go Format Cells... click Number tab... Catagory:
custom... Type:

#.##; -#.##; ""

Click OK.

Give that a try.


--
Barrett9699
------------------------------------------------------------------------
Barrett9699's Profile: http://www.excelforum.com/member.php...o&userid=37573
View this thread: http://www.excelforum.com/showthread...hreadid=573298



  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 31
Default Don't want 0.00

Well, that fixed the half that displays 80.00 if the sheet hasn't had any
hours entered yet, but still get 0.00 if 80 or more hours are worked :(

I set two conditions: Cell Value Is equal to 80 and Cell Value Is equal to
0 and set Font color (tried Pattern, too) to White.

--
David

Pete_UK wrote

You could apply conditional formatting - if the cell contents are zero
then use white for the foreground colour so that it doesn't show if
you have a white background.

Hope this helps.

Pete

David wrote:
I have a timesheet workbook.
Column N contains hours worked
Columns S-V is where I enter other types of paid leave used

I use this formula in H22 to calculate how much vacation time I used
in a pay period and it works fine with one exception:

=MAX(0,80-(SUM(N8:N12,N15:N19))-SUM(S8:V12,S15:V19))

The exception occurs if I work any total of 80 hours

Problem: with this scenario 0.00 is displayed in H22 rather than
remaining blank (I have 'Window options' 'Zero values' unchecked).

How can I keep that from happening?

--
David

  #7   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,856
Default Don't want 0.00

If it isn't exactly 0, then the effect won't happen - you might have
0.00001 but if the cell is formatted as 0.00 you won't see this. Change
the condition to "Is Less than" 0.01 and see if that works.

Pete

David wrote:
Well, that fixed the half that displays 80.00 if the sheet hasn't had any
hours entered yet, but still get 0.00 if 80 or more hours are worked :(

I set two conditions: Cell Value Is equal to 80 and Cell Value Is equal to
0 and set Font color (tried Pattern, too) to White.

--
David

Pete_UK wrote

You could apply conditional formatting - if the cell contents are zero
then use white for the foreground colour so that it doesn't show if
you have a white background.

Hope this helps.

Pete

David wrote:
I have a timesheet workbook.
Column N contains hours worked
Columns S-V is where I enter other types of paid leave used

I use this formula in H22 to calculate how much vacation time I used
in a pay period and it works fine with one exception:

=MAX(0,80-(SUM(N8:N12,N15:N19))-SUM(S8:V12,S15:V19))

The exception occurs if I work any total of 80 hours

Problem: with this scenario 0.00 is displayed in H22 rather than
remaining blank (I have 'Window options' 'Zero values' unchecked).

How can I keep that from happening?

--
David


  #8   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 31
Default Don't want 0.00

Well, that got close. Effect is that it leaves a '.' (decimal point) when
it evaluates to 0.00 hours, and if 8.00 hrs, '8.'

Format I've been using is Number w/2 decimal places

--
David

Barrett9699 wrote


Yeah, select cell H22, go Format Cells... click Number tab... Catagory:
custom... Type:

#.##; -#.##; ""

Click OK.

Give that a try.




  #9   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 31
Default Don't want 0.00

Hmm... Yep, that works. I don't understand how 80.00 hrs or more worked
doesn't result in exactly 0 hrs annual time used, though. I use
increments of 15 minutes for time worked. No partial minutes involved.

--
David

Pete_UK wrote

If it isn't exactly 0, then the effect won't happen - you might have
0.00001 but if the cell is formatted as 0.00 you won't see this.
Change the condition to "Is Less than" 0.01 and see if that works.

Pete

David wrote:
Well, that fixed the half that displays 80.00 if the sheet hasn't had
any hours entered yet, but still get 0.00 if 80 or more hours are
worked :(

I set two conditions: Cell Value Is equal to 80 and Cell Value Is
equal to 0 and set Font color (tried Pattern, too) to White.

--
David

Pete_UK wrote

You could apply conditional formatting - if the cell contents are
zero then use white for the foreground colour so that it doesn't
show if you have a white background.

Hope this helps.

Pete

David wrote:
I have a timesheet workbook.
Column N contains hours worked
Columns S-V is where I enter other types of paid leave used

I use this formula in H22 to calculate how much vacation time I
used in a pay period and it works fine with one exception:

=MAX(0,80-(SUM(N8:N12,N15:N19))-SUM(S8:V12,S15:V19))

The exception occurs if I work any total of 80 hours

Problem: with this scenario 0.00 is displayed in H22 rather than
remaining blank (I have 'Window options' 'Zero values'
unchecked).

How can I keep that from happening?

--
David




  #10   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default Don't want 0.00


Oops. Sorry! Try this one:

0.00, -0.00, ""

I tested is this time, and I think it's exactly what you want. Let me
know if it's not.


--
Barrett9699
------------------------------------------------------------------------
Barrett9699's Profile: http://www.excelforum.com/member.php...o&userid=37573
View this thread: http://www.excelforum.com/showthread...hreadid=573298



  #11   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 31
Default Don't want 0.00

I actually tried that while waiting for further responses - no joy, even
after changing commas to semicolons :(

Seems to me it would be the same as Number with 2 decimal places anyway,
would it not?

That said, I think I've solved this by adding INT in front of my formula:

=INT(MAX(0,40-(SUM(N7:N13))-SUM(S7:V13))+MAX(0,40-(SUM(N14:N20))-SUM
(S14:V20)))

--
David

Barrett9699 wrote


Oops. Sorry! Try this one:

0.00, -0.00, ""

I tested is this time, and I think it's exactly what you want. Let me
know if it's not.




  #12   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 31
Default Don't want 0.00

See my reply to Barrett9699 adding INT to beginning of my formula.
Still doesn't explain why it isn't an integer already, though.

--
David

Pete_UK wrote

If it isn't exactly 0, then the effect won't happen - you might have
0.00001 but if the cell is formatted as 0.00 you won't see this.
Change the condition to "Is Less than" 0.01 and see if that works.

Pete

David wrote:
Well, that fixed the half that displays 80.00 if the sheet hasn't had
any hours entered yet, but still get 0.00 if 80 or more hours are
worked :(

I set two conditions: Cell Value Is equal to 80 and Cell Value Is
equal to 0 and set Font color (tried Pattern, too) to White.

--
David

Pete_UK wrote

You could apply conditional formatting - if the cell contents are
zero then use white for the foreground colour so that it doesn't
show if you have a white background.

Hope this helps.

Pete

David wrote:
I have a timesheet workbook.
Column N contains hours worked
Columns S-V is where I enter other types of paid leave used

I use this formula in H22 to calculate how much vacation time I
used in a pay period and it works fine with one exception:

=MAX(0,80-(SUM(N8:N12,N15:N19))-SUM(S8:V12,S15:V19))

The exception occurs if I work any total of 80 hours

Problem: with this scenario 0.00 is displayed in H22 rather than
remaining blank (I have 'Window options' 'Zero values'
unchecked).

How can I keep that from happening?

--
David



  #13   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,856
Default Don't want 0.00

It may be due to rounding errors - Excel works in binary, so maybe
fractions of an hour can't be expressed with complete accuracy, and
these very small differences will add up over a number of calculations.

Anyway, I'm glad you got it sorted in the end.

Pete

David wrote:
See my reply to Barrett9699 adding INT to beginning of my formula.
Still doesn't explain why it isn't an integer already, though.

--
David

Pete_UK wrote

If it isn't exactly 0, then the effect won't happen - you might have
0.00001 but if the cell is formatted as 0.00 you won't see this.
Change the condition to "Is Less than" 0.01 and see if that works.

Pete

David wrote:
Well, that fixed the half that displays 80.00 if the sheet hasn't had
any hours entered yet, but still get 0.00 if 80 or more hours are
worked :(

I set two conditions: Cell Value Is equal to 80 and Cell Value Is
equal to 0 and set Font color (tried Pattern, too) to White.

--
David

Pete_UK wrote

You could apply conditional formatting - if the cell contents are
zero then use white for the foreground colour so that it doesn't
show if you have a white background.

Hope this helps.

Pete

David wrote:
I have a timesheet workbook.
Column N contains hours worked
Columns S-V is where I enter other types of paid leave used

I use this formula in H22 to calculate how much vacation time I
used in a pay period and it works fine with one exception:

=MAX(0,80-(SUM(N8:N12,N15:N19))-SUM(S8:V12,S15:V19))

The exception occurs if I work any total of 80 hours

Problem: with this scenario 0.00 is displayed in H22 rather than
remaining blank (I have 'Window options' 'Zero values'
unchecked).

How can I keep that from happening?

--
David



  #14   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 31
Default Don't want 0.00

Oops! Using INT had unwanted result of eliminating any quarter hours
from result. Switched to Round(),2) instead.

--
David

Pete_UK wrote

It may be due to rounding errors - Excel works in binary, so maybe
fractions of an hour can't be expressed with complete accuracy, and
these very small differences will add up over a number of
calculations.

Anyway, I'm glad you got it sorted in the end.

Pete

David wrote:
See my reply to Barrett9699 adding INT to beginning of my
formula. Still doesn't explain why it isn't an integer already,
though.

--
David

Pete_UK wrote

If it isn't exactly 0, then the effect won't happen - you might
have 0.00001 but if the cell is formatted as 0.00 you won't see
this. Change the condition to "Is Less than" 0.01 and see if that
works.

Pete

David wrote:
Well, that fixed the half that displays 80.00 if the sheet hasn't
had any hours entered yet, but still get 0.00 if 80 or more hours
are worked :(

I set two conditions: Cell Value Is equal to 80 and Cell Value Is
equal to 0 and set Font color (tried Pattern, too) to White.

--
David

Pete_UK wrote

You could apply conditional formatting - if the cell contents
are zero then use white for the foreground colour so that it
doesn't show if you have a white background.

Hope this helps.

Pete

David wrote:
I have a timesheet workbook.
Column N contains hours worked
Columns S-V is where I enter other types of paid leave used

I use this formula in H22 to calculate how much vacation time I
used in a pay period and it works fine with one exception:

=MAX(0,80-(SUM(N8:N12,N15:N19))-SUM(S8:V12,S15:V19))

The exception occurs if I work any total of 80 hours

Problem: with this scenario 0.00 is displayed in H22 rather
than remaining blank (I have 'Window options' 'Zero values'
unchecked).

How can I keep that from happening?

--
David




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
calculate totals Marilyn Excel Discussion (Misc queries) 3 July 9th 06 09:00 PM
import multiline data from text file Razorback76 Excel Discussion (Misc queries) 0 June 20th 06 06:13 AM
How to cause the value in the denominator change with changing row nander Excel Discussion (Misc queries) 6 March 22nd 06 01:11 AM
Currency formula/formatting problem Earl Excel Discussion (Misc queries) 4 March 20th 06 02:59 PM
Autofill/Reference Confusion Patrick White Excel Worksheet Functions 0 June 4th 05 01:07 PM


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