Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Excel Scheduling Calendar

Hi, thanks in advance - I am suffering from poor math
skills late at night.

I am trying to write a piece of code that goes into an
excel calendar I have created and maps (visually) tasks
and events over dates. I have a seperate sheet that lists
tasks and their respective dates.

I am fine with taksks that start in one montha and do not
corssover into other months, but once they start
overlapping I run into errors. The math I am trying to do
relies on the cell value - as the cell is the number of
the day in the month (ie, if a task starts of Jan 28th and
ends on Jan 29th it shows up on Jan 28th and 29th) When a
task spans Jan 28th to Feb 2nd the whole sheet barfs...
any ideas? (ps CurMonth is the current month the user is
looking at)

If Month(StartDate) < CurMonth Then
' Do nothing if the current task does not
start in the current month
Else
' Find the calendar days within the current
schedule tasks Start and End Dates
For Each cell In Worksheets
("calendar").Range("a3:g12")
If ((cell.Value = Day(DateValue
(StartDate))) And ((cell.Value <= Day(DateValue(EndDate))
And Month(DateValue(EndDate)) = CurMonth) Or (cell.Value
= Day(DateValue(EndDate)) And Month(DateValue(EndDate))

CurMonth))) Then
' If cell.Value = Day(DateValue
(StartDate)) And cell.Value <= Day(DateValue(EndDate)) Then
' If the current calander day
(cell.Value) falls in the current task Start and End dates,
' add the ProjectName and
ActivityType to the cell below the current calendar day
cell.
' If the current calendar day cell
already has something in it, concatenate to it,
' otherwise, add the project name
and activity to the calendar cell under the day
' (i.e. cell.Offset(1,0)).
If cell.Offset(1, 0).Value < ""
Then
cell.Offset(1, 0).Value =
cell.Offset(1, 0).Value & Chr(10) & Chr(10) & ProjectName
& Chr(10) & ActivityType
Else
cell.Offset(1, 0).Value =
ProjectName & Chr(10) & ActivityType
End If
Else
' do nothing - i.e. move to the
next cell in the calendar
End If
Next
End If
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
excel scheduling luke gilderbloom Excel Worksheet Functions 1 December 16th 09 10:28 PM
how do i export excel calendar info to outlook calendar? Maggie Excel Discussion (Misc queries) 1 December 31st 07 10:27 PM
Can you link a scheduling calendar in Excel Facilities Excel Worksheet Functions 0 November 28th 07 05:15 PM
Link or Copy Excel Data to Calendar (for scheduling) for Visual Aid supafreeza Excel Discussion (Misc queries) 1 July 10th 05 04:47 AM
scheduling calendar Disorganized receiving Excel Discussion (Misc queries) 1 May 4th 05 03:46 AM


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

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"