Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
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

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
Code modification help AndyMP Excel Programming 2 February 8th 09 11:52 PM
Code modification help AndyMP Excel Worksheet Functions 1 February 8th 09 11:41 PM
Code modification help please Chris Hankin[_4_] Excel Programming 2 March 26th 07 04:42 AM
Modification in the CODE to HIDE rows and columns that start with ZERO (code given) Thulasiram[_2_] Excel Programming 4 September 26th 06 04:15 AM
modification for the code srinivasan Excel Programming 2 August 20th 05 03:12 PM


All times are GMT +1. The time now is 11:17 PM.

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

About Us

"It's about Microsoft Excel"