ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Runtime error 1004 on an application.count statement (https://www.excelbanter.com/excel-programming/406769-runtime-error-1004-application-count-statement.html)

PhilM[_2_]

Runtime error 1004 on an application.count statement
 
Monthrange = Application.CountIf(Sheets("inpatient data").Range("R" &
essstart & "r:" & ESSend), Monthvalue(Monthdataloop))

Having problems with the above statement

Values as follows

essstart = 44405
essend = 52346
Monthvalue = April (as string)

Can anyone spot anything obvious?

Having to do the count to determine how many entries per month to find
out where each month starts. Application.match reuturned the same error

Jim Rech[_2_]

Runtime error 1004 on an application.count statement
 
& "r:" &

Maybe:

& ":r" &

--
Jim
"PhilM" wrote in message
...
| Monthrange = Application.CountIf(Sheets("inpatient data").Range("R" &
| essstart & "r:" & ESSend), Monthvalue(Monthdataloop))
|
| Having problems with the above statement
|
| Values as follows
|
| essstart = 44405
| essend = 52346
| Monthvalue = April (as string)
|
| Can anyone spot anything obvious?
|
| Having to do the count to determine how many entries per month to find
| out where each month starts. Application.match reuturned the same error




All times are GMT +1. The time now is 01:41 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com