Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Hi every body How does excel destinguish what date is today? I use Excel as a scheduling program. I have my daily schedule In *sheet1* with the the tasks and the the duration (Start date and finish date) I would like to have a macro to be able to distinguish what date is today and copy all the tasks which are planned just for today in sheet1 (in Colomn A) and past them in column A in sheet2.For e.g. I would like to see the tasks for 01/05/2006 in another sheet. Thk hme -- hme ------------------------------------------------------------------------ hme's Profile: http://www.excelforum.com/member.php...o&userid=15930 View this thread: http://www.excelforum.com/showthread...hreadid=537674 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Today's date is the Date function in VBA, so you would just do something
like For this_row = 1 To last_row_number If Cells(this_row,"A").Value = Date Then j = j + 1 Cells(this_row,"A").Copy Worksheets("Sheet2").Range("A" & j) End If Next this_row -- HTH Bob Phillips (remove nothere from email address if mailing direct) "hme" wrote in message ... Hi every body How does excel destinguish what date is today? I use Excel as a scheduling program. I have my daily schedule In *sheet1* with the the tasks and the the duration (Start date and finish date) I would like to have a macro to be able to distinguish what date is today and copy all the tasks which are planned just for today in sheet1 (in Colomn A) and past them in column A in sheet2.For e.g. I would like to see the tasks for 01/05/2006 in another sheet. Thk hme -- hme ------------------------------------------------------------------------ hme's Profile: http://www.excelforum.com/member.php...o&userid=15930 View this thread: http://www.excelforum.com/showthread...hreadid=537674 |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Thank for prompt reply I did not understand. Requester Macro should find today date in sheet1 where there is all the date from 1/1/2006 to 31/12/2006 and correspond task. Later the task shoud be copy to sheet2. thk hme -- hme ------------------------------------------------------------------------ hme's Profile: http://www.excelforum.com/member.php...o&userid=15930 View this thread: http://www.excelforum.com/showthread...hreadid=537674 |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Sub CopyData()
Dim this_row As Long Dim last_row_number As Long Dim start_date As Date Dim end_date As Date Dim j As Long start_date = DateSerial(2006, 1, 1) end_date = DateSerial(2006, 12, 31) last_row_number = Cells(Rows.Count, "A").End(xlUp).Row For this_row = 1 To last_row_number If Cells(this_row, "A").Value = start_date And _ Cells(this_row, "A").Value <= end_date Then j = j + 1 Rows(this_row).Copy Worksheets("Sheet2").Range("A" & j) End If Next this_row End Sub -- HTH Bob Phillips (remove nothere from email address if mailing direct) "hme" wrote in message ... Thank for prompt reply I did not understand. Requester Macro should find today date in sheet1 where there is all the date from 1/1/2006 to 31/12/2006 and correspond task. Later the task shoud be copy to sheet2. thk hme -- hme ------------------------------------------------------------------------ hme's Profile: http://www.excelforum.com/member.php...o&userid=15930 View this thread: http://www.excelforum.com/showthread...hreadid=537674 |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Thanks Bob I tried what you suggested and it is working very well. Thanks again hm -- hm ----------------------------------------------------------------------- hme's Profile: http://www.excelforum.com/member.php...fo&userid=1593 View this thread: http://www.excelforum.com/showthread.php?threadid=53767 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Possible to distinguish uppercase from lowercase text? | Excel Discussion (Misc queries) | |||
CF to distinguish Formulas from Inputs | Excel Worksheet Functions | |||
how to distinguish between text cells? | New Users to Excel | |||
How to distinguish the method Excel was opened? | Excel Programming | |||
Help with inputbox (Distinguish OK from Cancel) | Excel Programming |