LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
dan dan is offline
external usenet poster
 
Posts: 15
Default Tricky Date Calculation

Hi, I have a spreadsheet similiar to the one below. Lets call it
Sheet1. Using an excel macro, on a new sheet, lets call it Sheet2, I
want the first row to have the amount of time between start and stop
(stop-start) for the value 20, and to copy the value in column D. So
sheet 2 might look like:
Sheet 2
Col A Col B Col C
20 13 days Dog

Notice that sometimes stop is listed on the row before start, and
sometimes start is before stop. Also, sometimes there is only a start
or a stop for a value in A, bur not both - in this case, I'd like to
ignore that set.

Is there some way to say something like ColB.Stop - ColB.Start WHERE
ColA = ColA or something like that??


Sheet 1
Col A Col B Col C Col D
20 Start 5/17/2006 6:26:58 AM Dog
20 Stop 5/30/2006 11:54:33 AM Dog
30 Stop 5/28/2006 11:26:12 AM Cat
30 Start 5/20/2006 1:54:32 AM Cat
32 Stop 5/22/2006 5:56:38 AM Horse

Thank you soooo much!!!!
Dan

 
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
Tricky IF/Then Date based formula needed Titanium Excel Worksheet Functions 20 September 6th 07 01:50 AM
Tricky Date calculation: How to calculate a future date [email protected] Excel Discussion (Misc queries) 9 August 11th 06 04:24 AM
Date stamp formula results? Tricky problem? mjp Excel Discussion (Misc queries) 0 November 18th 05 04:11 PM
Tricky hour calculation (re overtime spreadsheet). StargateFan[_3_] Excel Programming 5 July 15th 05 10:49 AM
Coding to show first _weekday_ prior to a date, when date calculation happens to fall on weekend? StargateFan[_3_] Excel Programming 5 December 9th 04 09:06 AM


All times are GMT +1. The time now is 02:06 AM.

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"