Forum     

Go Back   Digit Technology Discussion Forum > Software > Software Q&A
Register FAQ Calendar Mark Forums Read

Software Q&A Having trouble with software? Find solutions here


Closed Thread
 
LinkBack Thread Tools Display Modes
Old 27-09-2007, 05:53 PM   #1 (permalink)
The Frozen Nova
 
casanova's Avatar
 
Join Date: Sep 2004
Location: Trespasser in Virtual Land
Posts: 1,641
Question How to do do this in Excel.


It is quite easy to subtract dates and times in Excel but it doesn't always show reality.

E.g Lets say that some1 is working on a project. He works every weekday from 10am-5pm. Lets say that the person starts working on 1st Jan and ends the project on 31 Jan. Now Excel will show the effort to be 31 Days (almost) whereas the reality is different. It would be something like 22 (no. of weekdays) * 7 (hours) hours.

So how can we achieve something like this.
__________________
I dream of a better tomorrow... where chickens can cross roads and not have their motives questioned.

www.nerdweed.blogspot.com
casanova is offline  
Advertisements. Register and be a member of the community to get rid of them.
Advertisement

Old 27-09-2007, 06:55 PM   #2 (permalink)
Apprentice
 
Join Date: Jan 2007
Posts: 96
Default Re: How to do do this in Excel.

You can use the NETWORKDAYS function for this type of calculation:

Cell A1: Start Date
Cell A2: End Date
Cell A3: Hours worked per day
Cell A4: =NETWORKDAYS(A1,A2)*A3 will give you the total hours worked by this person, counting only weekdays.
pillainp is offline  
Old 27-09-2007, 08:22 PM   #3 (permalink)
dig_boy_dig,dig !
 
skghosh44's Avatar
 
Join Date: Sep 2006
Location: Birth Place of IOCL
Posts: 414
Default Re: How to do do this in Excel.

As the question here about date Calculation, hence I wish to ask a question here. If I format a cell for british date (dd/mm/yyyy) exell accept it, but after some days some of the date which are 1-12 got automatically changed to american date format. I cant understand the problem why this is happening can any body point out the problem.

Another question it may be a simple question, but I am unable to do it. In the british date format how to find out the days by substracting between the date.(both days inclusive)
__________________
________________________________________________
I like signature after 10 P.M.
skghosh44 is offline  
Old 27-09-2007, 11:28 PM   #4 (permalink)
The Frozen Nova
 
casanova's Avatar
 
Join Date: Sep 2004
Location: Trespasser in Virtual Land
Posts: 1,641
Default Re: How to do do this in Excel.

@pillainp

I know about NETWORKDAYS. I came across through help in excel. It does count only weekdays, but there is an issue

Lets say, if one cell contains the value 12/9/2007 11:00 AM and next cell contain 12/9/2007 11:30 AM or 14/9/2007 5M

If I use NETWORKDAYS, I would get the result 1 or 2 and if I multiply it with 24, I would get 24 or 48. However; the real results would be .25 or 13 hours. I am adding this to the example mentioned above. Might be some complex formula along with NETWORKDAYS would help, but I don't know much about excel.
__________________
I dream of a better tomorrow... where chickens can cross roads and not have their motives questioned.

www.nerdweed.blogspot.com
casanova is offline  
Old 27-09-2007, 11:29 PM   #5 (permalink)
Apprentice
 
Join Date: Jan 2007
Posts: 96
Default Re: How to do do this in Excel.

Excel basically treats all dates as an indexed series of numbers. So no matter how you set the date (ie. British or US format), it will treat each date as a number incremented from 01/01/1900 (on Windows), with that date being assigned the value 1. Each full day also carries the value 1.

If you want to see the numerical value of a date in Excel, just type it into a cell, press ENTER to exit edit mode, and then press CTRL+~. This is a toggle, pressing it again will display the date.
So you can do addition and subtraction between dates (or use their numerical values instead. Just add 1 to the result to get the result with both dates inclusive.
pillainp is offline  
Old 28-09-2007, 08:40 AM   #6 (permalink)
dig_boy_dig,dig !
 
skghosh44's Avatar
 
Join Date: Sep 2006
Location: Birth Place of IOCL
Posts: 414
Default Re: How to do do this in Excel.

If I enter as
25/09/2007 in Cell A1 and 27/09/2007 in Cell B1 and the the cell is formated as UK date format now how I will get the result 4 in cell C1.

If I type in Cell A3 as +(a2-a1)+1 the result displays as #VALUE i.e text.
__________________
________________________________________________
I like signature after 10 P.M.
skghosh44 is offline  
Old 28-09-2007, 03:24 PM   #7 (permalink)
The Researcher
 
Join Date: Mar 2006
Location: Mumbai
Posts: 1,122
Default Re: How to do do this in Excel.

@skghosh44

If we do as posted by you, we get something like this 02/01/1900 00:00
format it to numbers. You will get 3.

Before doing the above, you may make sure that in the control panel>regional settings the date format is set to dd/mm/yyyy

Hope this solves your problem.
Ramakrishnan is offline  
Old 28-09-2007, 09:53 PM   #8 (permalink)
dig_boy_dig,dig !
 
skghosh44's Avatar
 
Join Date: Sep 2006
Location: Birth Place of IOCL
Posts: 414
Default Re: How to do do this in Excel.

Quote:
Originally Posted by Ramakrishnan
@skghosh44

If we do as posted by you, we get something like this 02/01/1900 00:00
format it to numbers. You will get 3.

Before doing the above, you may make sure that in the control panel>regional settings the date format is set to dd/mm/yyyy

Hope this solves your problem.
I have change the regional settings as English(united kingdom)
and changed the enter date to number format but the result is same as 02/01/1900 00:00.
Will u pl show me how u get the result 3.
__________________
________________________________________________
I like signature after 10 P.M.
skghosh44 is offline  
Old 29-09-2007, 11:29 AM   #9 (permalink)
The Researcher
 
Join Date: Mar 2006
Location: Mumbai
Posts: 1,122
Smile Re: How to do do this in Excel.

Quote:
Originally Posted by skghosh44
Will u pl show me how u get the result 3.
Right click the cell containing the result and choose "format cells". Click the "number" tab and and format it to number. That is all.
Ramakrishnan is offline  
Closed Thread

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
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
need excel help anandk Software Q&A 3 07-08-2007 11:31 PM
Help in Excel spp_itim Software Q&A 4 06-02-2007 04:16 PM
Learn Excel from Mr. Excel Ramakrishnan Software Q&A 1 25-12-2006 08:27 PM
help for excel Cool Buddy Software Q&A 2 09-11-2006 04:36 PM
EXCEL hunt Software Q&A 4 01-10-2005 08:04 AM

 
Latest Threads
- by Niilesh
- by clinton
- by Tenida
- by abhidev

Advertisement




All times are GMT +5.5. The time now is 05:29 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.

Search Engine Optimization by vBSEO 3.3.2