PC Review


Reply
Thread Tools Rate Thread

Auto-populate cells based on dates

 
 
Freddy
Guest
Posts: n/a
 
      27th Oct 2009
Microsoft Visual Basic 6.5 on Microsoft Excel 2002 SP3. I'd like assistance
in writing VBA code to evaluate a column of dates then copy them to a
different cell depending on the date thereby sorting them to eventually
determine which slots remain to be filled.
 
Reply With Quote
 
 
 
 
Bob Bridges
Guest
Posts: n/a
 
      27th Oct 2009
Hi, Freddy. What criteria will you use for placing the dates in their new
location? Is it simply a serial decision (eg Jan 1 will go in row 2, Jan 5
in row 6 and Feb 2 in row 34)? If so, this sounds pretty simple, but I need
some decision to be sure.

On the assumption that you already know some VBA, here's a bit of (untested)
code that could work along the above lines:

LowestDate = CDate("2008-06-01") 'for example
For Each co In FromDateRange
If IsDate(co.Value) Then 'ignore non-date values
ToRow = CDate(co.Value) - LowestDate + 2
ToSheet.Cells(ToRow, 1) = co.Value
End If
Next co

--- "Freddy" wrote:
> Microsoft Visual Basic 6.5 on Microsoft Excel 2002 SP3. I'd like assistance
> in writing VBA code to evaluate a column of dates then copy them to a
> different cell depending on the date thereby sorting them to eventually
> determine which slots remain to be filled.

 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Auto-populate other cells based on dates Freddy Microsoft Excel Misc 2 28th Oct 2009 02:21 PM
Auto-populate other cells based on dates Freddy Microsoft Excel Programming 1 27th Oct 2009 09:21 PM
Auto-populate other cells based on dates Freddy Microsoft Excel Programming 2 27th Oct 2009 06:46 PM
Auto-populate other cells based on dates Freddy Microsoft Excel Programming 0 27th Oct 2009 04:51 PM
Auto populate cells based on 2 cells division. =?Utf-8?B?Q2hhbmNlMjI0?= Microsoft Excel Misc 0 4th Apr 2005 09:35 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 11:58 PM.