nicolehalliday
Board Regular
- Joined
- May 19, 2010
- Messages
- 56
Hi,
I am having trouble getting my macro to run under the condition that two cells do not match. Does anyone see a problem with this statement?
Cell EA11 has the formula =WORKDAY(TODAY(),-1) and cell A3 has the formula =TEXT(A2,"MM/DD/YYYY"), but they return the same date and appear the same. My idea was that if the above statement is true, a msgbox appears saying "Updated", and if the condition is not met, then I will run a longer macro.
An alternative to this approach would be to have the macro run automically each day even if the spreadsheet is not opened that day... However I am very much a beginner and that sounds quite complicated. Anyways, help or suggestions are appreciated! Thanks
I am having trouble getting my macro to run under the condition that two cells do not match. Does anyone see a problem with this statement?
Code:
If Sheets("highs").Range("EA11").Value = Sheets("daily").Range("A3").Value Then
Cell EA11 has the formula =WORKDAY(TODAY(),-1) and cell A3 has the formula =TEXT(A2,"MM/DD/YYYY"), but they return the same date and appear the same. My idea was that if the above statement is true, a msgbox appears saying "Updated", and if the condition is not met, then I will run a longer macro.
An alternative to this approach would be to have the macro run automically each day even if the spreadsheet is not opened that day... However I am very much a beginner and that sounds quite complicated. Anyways, help or suggestions are appreciated! Thanks