I have a code that attaches active Excel workbook to an email, populates, to: cc: subject: and body. In body text have a placeholder: ZZZZZ Need for it to be replaced with number of rows in column A that have value over 10
Getting a Compile error: Syntax error on second line of the following bit of code:
Code
Dim Y As Integer
Y = WorksheetFunction.CountIf(Range("a2").End(xlDown).Value, >10)
EmailItem.HTMLBody = Replace(EmailItem.HTMLBody, "ZZZZZ", Y)
Help!