How do I fix this so I don't get an "Error 2015"

  • Thread starter Thread starter 2D Rick
  • Start date Start date
2

2D Rick

Dim x
x = Application.CountIf("E5,E6000", "T13065")

How do I fix this so I don't get an "Error 2015"

Thanks, Rick
 
Not tried it but I would think

x=Application.Countif(Range("E5:E6000"),"T13065")

Providing T13065 is a string you are counting. If it's a range reference

x=Application.Countif(Range("E5:E6000"),Range("T13065"))

--
HTH
Nick Hodge
Microsoft MVP - Excel
Southampton, England
(e-mail address removed)
www.nickhodge.co.uk
 
Thanks Nick, it works
Rick


Nick said:
Not tried it but I would think

x=Application.Countif(Range("E5:E6000"),"T13065")

Providing T13065 is a string you are counting. If it's a range reference

x=Application.Countif(Range("E5:E6000"),Range("T13065"))

--
HTH
Nick Hodge
Microsoft MVP - Excel
Southampton, England
(e-mail address removed)
www.nickhodge.co.uk
 

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