Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / Programming / December 2006

Tip: Looking for answers? Try searching our database.

How do you solve this one ?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
DB - 31 Dec 2006 22:29 GMT
Hi...Im back again.............I thought i'd sorted it then this one popped
up........

I'm doing the time sheets for work (still!).........to try and keep it
simple, I input peoples start and finish times into a cell, that data is
copied to a section lower down the page (this is eventually printed and
handed out so that the staff know who is doing what that week)
Well, it was working fine....till i tried something..

The cells have the staff members name......their start time,their finish
time...the finish time minus the start time gives the hours a person works
that day.......so far so good......
If a person is off work then its displays DAY in the start time box....and
OFF in the end time box - this makes it show #value! in the Hours
box.......this I can sort of live with....but......the worksheet also adds
up the persons hours.......but what with this #value
in one of the cells - it is stopping it from adding up.

If we had permanent static duties it wouldnt be a problem - but every ow and
again a person works extra.

How can I make an entry that will allow this ?

All help appreciated - Dave :)

     MONDAY  DAY OFF #VALUE!
     TUESDAY 08:20 17:30 9:10
     WEDNESDAY 08:50 18:20 9:30
     THURSDAY 08:50 12:40 3:50
     FRIDAY 08:50 17:35 8:45
     SATURDAY 08:50 17:35 8:45

     TOTAL HOURS     #VALUE!

I can email the worksheet if you want it
Gary Keramidas - 31 Dec 2006 22:36 GMT
don't know what your layout is, but if the day, start time, end time and hours
worked are adjacent, you could use a formula for the hours worked.

if(c1="OFF",0,c1-b1)

Signature

Gary

> Hi...Im back again.............I thought i'd sorted it then this one popped
> up........
[quoted text clipped - 31 lines]
>
> I can email the worksheet if you want it
JMB - 31 Dec 2006 22:45 GMT
If they have the day off, do you want 0 hours to appear?

You could use IsError inside of an IF statement to trap the error.
=IF(ISERROR(B1-A1),0,B1-A1)
where B1 is the end time and A1 is then start time.  Substitute B1-A1 for
whatever formula you are using if it is different.

> Hi...Im back again.............I thought i'd sorted it then this one popped
> up........
[quoted text clipped - 31 lines]
>
> I can email the worksheet if you want it
DB - 31 Dec 2006 23:17 GMT
er............this is where I show my total ignorance.....

I havent a clue about VB and do everything in crude methods....such as
working the maths out myself and then using the autosum to get my answers in
the way that I work them out.(If you follow me)

If you have the time, tell me what to do where and i'll do it..

Thanks

Dave :)

P.S. it's 23.15 here so Happy New Year to everyone

> If they have the day off, do you want 0 hours to appear?
>
[quoted text clipped - 43 lines]
>>
>> I can email the worksheet if you want it
Tom Ogilvy - 31 Dec 2006 23:41 GMT
> I havent a clue about VB
There were instructions to use VB at all.  The answers were both for
formulas used in the worksheet - to replace the ones returning the #Value
error.

Instead of using

=B1-A1 to get the number of hours worked, use

=IF(ISERROR(B1-A1),0,B1-A1)

obviously adjust the B1 to indicate the cell in the row that has the finish
time and A1 to indicate the cell in the row that has the start time.

Signature

Regards,
Tom Ogilvy

> er............this is where I show my total ignorance.....
>
[quoted text clipped - 57 lines]
>>>
>>> I can email the worksheet if you want it
DB - 31 Dec 2006 23:54 GMT
Absolutely Spot On - Problem Sorted....

Many Many Thanks

Dave :)))

>> I havent a clue about VB
> There were instructions to use VB at all.  The answers were both for
[quoted text clipped - 75 lines]
>>>>
>>>> I can email the worksheet if you want it
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.