#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 31
Default date range

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,058
Default date range

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 31
Default date range

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 31
Default date range

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
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
Create a formula in a date range to locate a specific date - ecel util Excel Discussion (Misc queries) 0 February 19th 07 03:03 PM
copy date based on date -refer to date range mindpeace[_4_] Excel Programming 1 June 3rd 06 01:30 PM
Formula for determining if two date columns fall within specific date range Igottabeme Excel Worksheet Functions 2 April 21st 06 02:50 AM
Formula for determining if two date columns fall within specific date range Igottabeme Excel Discussion (Misc queries) 1 April 20th 06 10:03 PM
How to count dates within a certain range in a column with mutiple date range entries Krisjhn Excel Worksheet Functions 2 September 1st 05 01:59 PM


All times are GMT +1. The time now is 06:44 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"