View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
tkraju via OfficeKB.com tkraju via OfficeKB.com is offline
external usenet poster
 
Posts: 109
Default code modification

One of code contains these lines:
Dim TargetMonth as Integer
...................
TargetMonth = Month(Range("M1"). Value)
..............
If(Month(Cells(r.Row,3).Value= TargetMonth Then

Value in cell M1 =Apr-09 ,the value is variable.The above code is comparing
only month value of cell M1 value,thus I am getting results of Apr month i.e
(Apr-07,Apr-08,Apr-09).
how to modify the above code ,to compare both month and year of cell M1 value.


--
Message posted via http://www.officekb.com