LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Dr. Darrell
 
Posts: n/a
Default Instead of a negative number, I'd like to show zero...

I have created a virtual timecard. Everything works good except, if I havent
filled in all my time in and time out cells, my result is a negative number.
I would prefer that the result is blank unless there is a whole number.

My structure is as follows:

Cell C14 Clock In Format h:mm
Cell D14 Clock Out Format h:mm
Cell E14 Clock In Format h:mm
Cell F14 Clock Out Format h:mm
Cell J14 Total Hours Formula =SUM((D14-C14)*24,(F14-E14)*24)

The result of my efforts are as follows:

When €“ Scenario # 1

Cell C14 Clock In 6:45
Cell D14 Clock Out Blank
Cell E14 Clock In Blank
Cell F14 Clock Out Blank
Cell J14 Total Hours -6.75

When€“ Scenario # 2

Cell C14 Clock In 6:45
Cell D14 Clock Out 12:00
Cell E14 Clock In Blank
Cell F14 Clock Out Blank
Cell J14 Total Hours 5.25

When€“ Scenario # 3

Cell C14 Clock In 6:45
Cell D14 Clock Out 12:00
Cell E14 Clock In 12:30
Cell F14 Clock Out Blank
Cell J14 Total Hours -7.25

When€“ Scenario # 4

Cell C14 Clock In 6:45
Cell D14 Clock Out 12:00
Cell E14 Clock In 12:30
Cell F14 Clock Out 16:00
Cell J14 Total Hours 8.75

I don't want the negative numbers to show in the Total Hours Cell, instead I
would like:

In Scenario # 1, I would like Cell J14 to be Blank
In Scenario # 3, I would like Cell J14 to be equal to that of Scenario # 2.

I have tried several variations of IF statements, and Ive yet to type in
the correct syntax.

Can someone direct me down the right path?

Respectfully,
Darrell

 
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
Negative Number column go New Users to Excel 1 November 28th 05 01:10 AM
Find a negative number in a range Scott at Culvers Excel Worksheet Functions 1 November 22nd 05 04:55 PM
Change Number to a negative in VBA Noemi Excel Discussion (Misc queries) 2 November 22nd 05 11:58 AM
Show last number entered hodkd Excel Discussion (Misc queries) 2 November 9th 05 08:31 PM
how do i subtract a negative number anndee Excel Worksheet Functions 2 June 11th 05 08:14 PM


All times are GMT +1. The time now is 07:16 PM.

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"