Hi there!
Welcome here at excelfox.
The first thing to check is to change …_
If c = "yes" And Month(Intersect(Rows(c.Row), Range("A1:A5000"))) = Month(Now) Then
_... to
If c = "yes" And Month(Intersect(Rows(c.Row), Range("A1:A5000")).Value) = Month(Now) Then
To explain :
Most people get in the bad habit of missing that out .Value. ( Even me sometimes Lol!!!!! :-) )
Using .Value on a range object ( Your Intersect(Rows(c.Row), Range("A1:A5000")) should give you a range object ) ensures that a value is returned rather than the range object. In 99% of the uses of a range object in a code, VBA guesses that you wanted the .Value, so it assumes that and adds it internally. So people get in the habit of missing it out to save a bit of typing.
_._________________-
The easiest way to take it further if you need more help would be to upload a reduced data test file:
Prepare a small, reduced row, test data sample of your file, that is to say the worksheet which you copy from. Change any sensitive/ private/ personal data, or just make data up.
Show an output/after worksheet which you prepare yourself/ fill in manually. That should show exactly the output that you want the coding to give you , based on your data worksheet
Choose the data carefully so that it tests all possible scenarios.
You only need a very small number of rows to develop the coding on: You may have noticed that the coding is usually written to work on the data that is there: The coding usually automatically adjusts to work on any amount of rows. But it is a lot easier to develop coding with a small amount of test data, that is to say a small amount of rows.
We can then get your current code working and possibly suggest some quicker alternatives, such as one I did recently here:
http://www.eileenslounge.com/viewtop...=31687#p245219
Alan
P.S. it is not obvious the first time around how to upload a file here. Here is some notes on it
http://www.excelfox.com/forum/showth...age9#post10769
If that proves difficult , then contact me privately and we will find a way for you to give me a file




Reply With Quote
Bookmarks