Wikiposts
Search
Computer/Internet Issues & Troubleshooting Anyone with questions about the terribly complex world of computers or the internet should try here. NOT FOR REPORTING ISSUES WITH PPRuNe FORUMS! Please use the subforum "PPRuNe Problems or Queries."

Excel Date Problem

Thread Tools
 
Search this Thread
 
Old 4th May 2005, 08:55
  #1 (permalink)  
Thread Starter
 
Join Date: Feb 2003
Location: Io
Posts: 420
Likes: 0
Received 0 Likes on 0 Posts
Excel Date Problem

I am working on a spreadsheet that has amongst other things, two columns of dates - "Date In" and Date Out". I have another column that simply calculates the number of days between IN and OUT. I need to have a seperate cell that shows the average number of days based on the information I have already calculated. This is where I am struggling. I thought it would simply be a matter of totalling the number of days coulmn and dividing by the number of date lines. This doesn't work, I keep getting a VALUE error in the cell.

Can anyone put me out of my misery?

Thanks in advance.

MF
Maxflyer is offline  
Old 4th May 2005, 09:08
  #2 (permalink)  

Jack's Granddad
 
Join Date: Jun 2003
Location: Lancashire
Age: 76
Posts: 623
Received 0 Likes on 0 Posts
How about =AVERAGE(A1:A10), inserting the appropriate cell references?
Duckbutt is offline  
Old 4th May 2005, 09:09
  #3 (permalink)  

Official PPRuNe Chaplain
 
Join Date: Apr 2001
Location: Witnesham, Suffolk
Age: 80
Posts: 3,498
Likes: 0
Received 0 Likes on 0 Posts
It depends on how you are doing it. The DATE in Excel is actually a number - years since 1/1/1900 (which is "1" in this context) with lots of decimals to take care of months, weeks, days, hours, etc. The "date" number format then converts this to the date we recognise.

If you subtract one date from another, the answer will (unless you reformat it) appear as a third date - and look odd.

You should be able to add those "differences", and divide them by the ROWS() count, and so on. My logbook certainly does that with no bother.

If all else fails, put the spreadsheet on a website and PM me the URL, and I'll take a look at it.

None of this works for dates before 1/1/1900. Excel will display them correctly, but won't recognise them as a date and won't process them in the same way. It can be done, but you need to extract day, month, and year and do your own calculations from those.
Keef is offline  
Old 4th May 2005, 09:23
  #4 (permalink)  
Thread Starter
 
Join Date: Feb 2003
Location: Io
Posts: 420
Likes: 0
Received 0 Likes on 0 Posts
Duckbutt

So simple, yet so effective. I'm just going off to bang my head against a brick wall for being so stupid.

Thanks

MF
Maxflyer is offline  

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 Off
Pingbacks are Off
Refbacks are Off



Contact Us - Archive - Advertising - Cookie Policy - Privacy Statement - Terms of Service

Copyright © 2024 MH Sub I, LLC dba Internet Brands. All rights reserved. Use of this site indicates your consent to the Terms of Use.