MikeLiberty
Board Regular
- Joined
- Aug 13, 2010
- Messages
- 55
Apologies if this has been addressed elsewhere, I couldn't find it.
I'm trying to determine if a value in a named range in one worksheet exists in column A of another worksheet. If it does, I want to set up a warning message, if not, I need to copy and paste some data. I had most of it working, but when I tried to limit the search to 1 column instead of the entire sheet, I broke something. Its been driving me crazy. Any help is appreciated. The relevant code is below.
Dim LastMonth As Boolean
LastMonth = Workbooks("MOR Workbook.xls").Worksheets("AWP12mo").Range("A:A").Find(What:=Worksheets("DataRetention").Range("RetentionDate").Value, _
After:= Range("A1"), LookIn:=xlFormulas, Lookat:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:= _
False, SearchFormat:=False).Activate
If LastMonth = True Then ..... {Rest of Code}
I'm trying to determine if a value in a named range in one worksheet exists in column A of another worksheet. If it does, I want to set up a warning message, if not, I need to copy and paste some data. I had most of it working, but when I tried to limit the search to 1 column instead of the entire sheet, I broke something. Its been driving me crazy. Any help is appreciated. The relevant code is below.
Dim LastMonth As Boolean
LastMonth = Workbooks("MOR Workbook.xls").Worksheets("AWP12mo").Range("A:A").Find(What:=Worksheets("DataRetention").Range("RetentionDate").Value, _
After:= Range("A1"), LookIn:=xlFormulas, Lookat:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:= _
False, SearchFormat:=False).Activate
If LastMonth = True Then ..... {Rest of Code}