Struggling to make an application.count work

  • Thread starter Thread starter Phil Martin
  • Start date Start date
P

Phil Martin

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
 
You had the R and : reversed. Try this.

Monthrange = Application.CountIf(Sheets("inpatient data").Range("R" &
essstart & ":R" & ESSend), Monthvalue(Monthdataloop))
 
D-uh, many thanks, been staring at that all day

JLGWhiz said:
You had the R and : reversed. Try this.

Monthrange = Application.CountIf(Sheets("inpatient data").Range("R" &
essstart & ":R" & ESSend), Monthvalue(Monthdataloop))
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top