Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
hi guys
is used a code from the following post: http://groups.google.com/group/micro...7 8d621af00bb modified it, and i got this Sub daterange(Optional eta As Date) today = DateSerial(2007, 1, 1) For Each cell In Range("H8:H10") If cell.Value < "" Then If cell.Value = today Then sStr = sStr & cell.Offset(0, -6).Value & vbNewLine End If End If Next If sStr < "" Then MsgBox sStr End If End Sub not en expert and dont know how to establish and make today = "todays date" how do i establish that ? |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
In place of:
today = DateSerial(2007, 1, 1) use: today=Date -- Gary''s Student - gsnu200753 "SangelNet" wrote: hi guys is used a code from the following post: http://groups.google.com/group/micro...7 8d621af00bb modified it, and i got this Sub daterange(Optional eta As Date) today = DateSerial(2007, 1, 1) For Each cell In Range("H8:H10") If cell.Value < "" Then If cell.Value = today Then sStr = sStr & cell.Offset(0, -6).Value & vbNewLine End If End If Next If sStr < "" Then MsgBox sStr End If End Sub not en expert and dont know how to establish and make today = "todays date" how do i establish that ? |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
On Nov 1, 2:02 pm, Gary''s Student
wrote: In place of: today = DateSerial(2007, 1, 1) use: today=Date -- Gary''s Student - gsnu200753 "SangelNet" wrote: hi guys is used a code from the following post: http://groups.google.com/group/micro...rogramming/bro... modified it, and i got this Sub daterange(Optional eta As Date) today = DateSerial(2007, 1, 1) For Each cell In Range("H8:H10") If cell.Value < "" Then If cell.Value = today Then sStr = sStr & cell.Offset(0, -6).Value & vbNewLine End If End If Next If sStr < "" Then MsgBox sStr End If End Sub not en expert and dont know how to establish and make today = "todays date" how do i establish that ? I always say, the simplest things get you. Thnx Gary |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
On Nov 1, 2:13 pm, SangelNet wrote:
On Nov 1, 2:02 pm, Gary''s Student wrote: In place of: today = DateSerial(2007, 1, 1) use: today=Date -- Gary''s Student - gsnu200753 "SangelNet" wrote: hi guys is used a code from the following post: http://groups.google.com/group/micro...rogramming/bro... modified it, and i got this Sub daterange(Optional eta As Date) today = DateSerial(2007, 1, 1) For Each cell In Range("H8:H10") If cell.Value < "" Then If cell.Value = today Then sStr = sStr & cell.Offset(0, -6).Value & vbNewLine End If End If Next If sStr < "" Then MsgBox sStr End If End Sub not en expert and dont know how to establish and make today = "todays date" how do i establish that ? I always say, the simplest things get you. Thnx Gary Is there a way to make this work with a calender object, so that when you click a date the macro searches based on the clicked date? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Create a formula in a date range to locate a specific date - ecel | Excel Discussion (Misc queries) | |||
copy date based on date -refer to date range | Excel Programming | |||
Formula for determining if two date columns fall within specific date range | Excel Worksheet Functions | |||
Formula for determining if two date columns fall within specific date range | Excel Discussion (Misc queries) | |||
How to count dates within a certain range in a column with mutiple date range entries | Excel Worksheet Functions |