Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Does anyone have a template for using Excel as a simple Construct.

We prepare a summary for people who do not know/have Project. The schedule
is simply the task name with cells on the row shaded to indicate the weeks of
the project duration. I am looking for a simple way to enter a start/end
date and have the system calculate and shade the appropriate number of cells
on the row.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 770
Default Does anyone have a template for using Excel as a simple Construct.

This assumes task name in column A, start dates in B and end dates in C.
Lots of nested Ifs to check if not blank, is date, not too many columns,
etc. Paste it into the worksheet module:

Private Sub Worksheet_Change(ByVal Target As Range)

Dim start_date As Range, end_date As Range

'assumes start_date in column B, end_date in C
Set start_date = Cells(Target.Row, 2)
Set end_date = Cells(Target.Row, 3)

'check for entry in column B or C
If Not Intersect(Target, Range(start_date, end_date)) Is Nothing Then
'if both columns have entries
If Not IsEmpty(start_date) Or IsEmpty(end_date) Then
'if both entries are dates
If IsDate(start_date) And IsDate(end_date) Then
If end_date start_date Then
'Color from Column D to left number of weeks or partial
weeks
'at least 1 week, no more than 253
end_date.Offset(0, 1).Resize(1,
WorksheetFunction.Min(Application.RoundUp((end_dat e - start_date) / 7, 0),
256 - end_date.Row)) _
.Interior.ColorIndex = 8
Else
MsgBox "End date must be later than start date"
End If
Else
MsgBox "Enter a Start and End Date"
End If
End If
End If

End Sub

hth,

Doug Glancy

"JLWCFM" wrote in message
...
We prepare a summary for people who do not know/have Project. The
schedule
is simply the task name with cells on the row shaded to indicate the weeks
of
the project duration. I am looking for a simple way to enter a start/end
date and have the system calculate and shade the appropriate number of
cells
on the row.



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
I need a simple excel-based template for business accounts FSt1 Excel Discussion (Misc queries) 0 February 25th 08 01:53 PM
how do i construct a correlogram in excel? Alice Charts and Charting in Excel 3 March 16th 06 10:44 PM
How can I construct a broken Y axis in Excel? Fisherwy Excel Discussion (Misc queries) 1 November 6th 05 04:53 PM
Simple Template excel for Books sam-c Excel Discussion (Misc queries) 1 August 18th 05 02:53 AM
Classes, and the For Each construct in Excel? Andy Excel Programming 1 August 3rd 04 02:29 PM


All times are GMT +1. The time now is 12:39 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"