#1   Report Post  
Posted to microsoft.public.excel.misc
SJC
 
Posts: n/a
Default Date Time Field

Is there a way to make the cost column do the following with a formula?

Start Cost
4/1/06 6:45 AM $10
4/1/06 7:00 AM $8
4/1/06 7:15 AM $6
4/1/06 6:00 PM $10
4/1/06 6:15 PM $8
4/1/06 6:30 PM $6
4/1/06 6:45 PM $6
4/1/06 7:00 PM $6
4/1/06 7:15 PM $6
4/2/06 6:45 AM $10
4/2/06 7:00 AM $8
4/2/06 7:15 AM $6
4/2/06 6:00 PM $10
4/2/06 6:15 PM $8
4/2/06 6:30 PM $6
4/2/06 6:45 PM $6
4/2/06 7:00 PM $6
4/2/06 7:15 PM $6
4/3/06 6:45 AM $10
4/3/06 7:00 AM $8
4/3/06 7:15 AM $6
4/3/06 7:30 AM $6
4/3/06 7:45 AM $6
4/3/06 6:00 PM $10
4/3/06 6:15 PM $8
4/3/06 6:30 PM $6
4/3/06 6:45 PM $6
4/3/06 7:00 PM $6
4/3/06 7:15 PM $6
4/3/06 7:30 PM $6

Basically I need to assign $10 cost to the first occurence in the AM and $10
cost to the first occurence in the PM. Then, I have to assign $8 cost to the
second occurence in the AM and $8 cost to the second occurence in the PM.
Then, I have to assign $6 cost to every occurence 3rd, 4th, or so on.
  #2   Report Post  
Posted to microsoft.public.excel.misc
Dave O
 
Posts: n/a
Default Date Time Field

With headers in A1 and B1, a blank row 2, and Excel readable dates
starting in A3, I used this formula to generate the same results as
your sample data:
=IF(INT(A3)<INT(A2),10,IF(AND(MOD(A3,1)=0.5,MOD( A2,1)<0.5),10,IF(B2=10,8,IF(B2=8,6,IF(B2=6,6)))))

  #3   Report Post  
Posted to microsoft.public.excel.misc
SJC
 
Posts: n/a
Default Date Time Field

Thanks Dave O. That works perfectly

"Dave O" wrote:

With headers in A1 and B1, a blank row 2, and Excel readable dates
starting in A3, I used this formula to generate the same results as
your sample data:
=IF(INT(A3)<INT(A2),10,IF(AND(MOD(A3,1)=0.5,MOD( A2,1)<0.5),10,IF(B2=10,8,IF(B2=8,6,IF(B2=6,6)))))


Reply
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
Changing a text field to a date field juliet New Users to Excel 4 February 21st 06 09:52 PM
Need help: convert seconds to date and time misty1 Excel Discussion (Misc queries) 2 November 26th 05 04:12 AM
How to get pivot table Time field to appear correctly wccmgr Excel Worksheet Functions 1 August 23rd 05 12:26 AM
How to Join/concatenate a date field with a time field in Excel? Alan Excel Discussion (Misc queries) 4 August 9th 05 10:07 PM
Remove time from a date and time field? Format removes the displa. oaoboc Excel Worksheet Functions 1 February 16th 05 07:20 PM


All times are GMT +1. The time now is 05:24 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"