VBA CountIF syntax error.

jcihak

New Member
Joined
Jun 6, 2018
Messages
8
Hello,


I am trying to fill a cell in with a COUNTIF formula, but it appears to not be formatted correctly. I am sure I have all the necessary quotations. What is keeping this from working? It is saying that there is an unexpected error at the end of the formula with the ")"


Range("E4").Select
ActiveCell.Formula = "=COUNTIF('Prepared Screens'!Q:Q,">14")"
Range("E5").Select
ActiveCell.Formula = "=COUNTIF('Senior Reviewed'!Q:Q,">14")"
Range("E6").Select
ActiveCell.Formula = "=COUNTIF('Manager Reviewed'!Q:Q,">14")"
 

Some videos you may like

Excel Facts

Format cells as time
Select range and press Ctrl+Shift+2 to format cells as time. (Shift 2 is the @ sign).

Fluff

MrExcel MVP, Moderator
Joined
Jun 12, 2014
Messages
46,207
Office Version
  1. 365
Platform
  1. Windows
All quotes inside the formula need to be doubled up like
Code:
"=COUNTIF('Prepared Screens'!Q:Q,"">14"")"
 

Watch MrExcel Video

Forum statistics

Threads
1,108,810
Messages
5,525,010
Members
409,615
Latest member
papaluigi94

This Week's Hot Topics

Top