Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 87
Default Auto-populate cells based on dates

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.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 257
Default Auto-populate cells based on dates

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.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Auto-populate cells based on dates


What are your slot time period. One day each or are the time periods
smaller than a day. Is what you looking for something like this


10/1/09 9:00 AM
10/1/09 10:00 AM
10/1/09 11:00 AM
10/1/09 12:00 PM
10/1/09 1:00 PM
10/1/09 2:00 PM
10/1/09 3:00 PM
10/1/09 4:00 PM
10/1/09 5:00 PM
10/2/09 9:00 AM
10/2/09 10:00 AM
10/2/09 11:00 AM
10/2/09 12:00 PM
10/2/09 1:00 PM
10/2/09 2:00 PM
10/2/09 3:00 PM
10/2/09 4:00 PM
10/2/09 5:00 PM
10/3/09 9:00 AM
10/3/09 10:00 AM
10/3/09 11:00 AM
10/3/09 12:00 PM
10/3/09 1:00 PM
10/3/09 2:00 PM
10/3/09 3:00 PM
10/3/09 4:00 PM
10/3/09 5:00 PM


Then you hav appointments like this in a second table
10/2/09 9:00 AM 2 hours long
10/3/09 10:00 AM 1 hours long
10/1/09 1:00 PM 3 hours long

And then you want to indicate in the first table which appointments are
filled?


--
joel
------------------------------------------------------------------------
joel's Profile: http://www.thecodecage.com/forumz/member.php?userid=229
View this thread: http://www.thecodecage.com/forumz/sh...d.php?t=148336

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
Auto-populate other cells based on dates Freddy Excel Discussion (Misc queries) 2 October 28th 09 02:21 PM
How to auto populate many cells based on one cell Banshee Excel Discussion (Misc queries) 4 August 5th 09 12:22 AM
auto populate dates dusty Excel Worksheet Functions 1 July 15th 08 05:14 AM
Auto populate several cells based on a selection from drop down li Sheldon Excel Discussion (Misc queries) 3 January 13th 06 08:12 PM
Auto populate cells based on 2 cells division. Chance224 Excel Discussion (Misc queries) 0 April 4th 05 09:35 PM


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