View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
[email protected] ckramer7070@gmail.com is offline
external usenet poster
 
Posts: 22
Default Method to get dates based on Month

Is there any way to have a for/next loop to search a Column for
months? One specific column has inventory number information as well
as date separators, the dates are in "mmm-yy" format.

Sub FindDate()
Dim FoundCell As Range
Dim Mnth As Variant

Range("InvNum").Select

Mnth = ?
For Mnth = Jan To Dec
With Sheets("Job Sheet")
Set FoundCell = .Cells.Find(What:=Mnth, _
After:=.Range("C2"),
LookIn:=xlValues, _
LookAt:=xlPart, SearchOrder: _
=xlByRows,
SearchDirection:=xlNext, _
MatchCase:=False)
If Not FoundCell Is Nothing Then
.Activate
FoundCell.Select
End If
End With
Next Mnth

End Sub

This is just testing code, I have many other actions waiting in anther
routine I need to plug in after this gets done.

Thanks for any help,

Chad