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


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

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

Thanks, Rick

0
rbrowniii (11)
1/7/2007 6:24:53 AM
excel 39879 articles. 2 followers. Follow

3 Replies
555 Views

Similar Articles

[PageSpeed] 40

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
nick_hodgeTAKETHISOUT@zen.co.ukANDTHIS
www.nickhodge.co.uk


"2D Rick" <rbrowniii@compuserve.com> wrote in message 
news:1168151093.743437.52990@q40g2000cwq.googlegroups.com...
>
>
> Dim x
> x = Application.CountIf("E5,E6000", "T13065")
>
> How do I fix this so I don't get an "Error 2015"
>
> Thanks, Rick
> 

0
1/7/2007 9:06:25 AM
Thanks Nick, it works
Rick


Nick Hodge wrote:
> 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
> nick_hodgeTAKETHISOUT@zen.co.ukANDTHIS
> www.nickhodge.co.uk
>
>
> "2D Rick" <rbrowniii@compuserve.com> wrote in message
> news:1168151093.743437.52990@q40g2000cwq.googlegroups.com...
> >
> >
> > Dim x
> > x = Application.CountIf("E5,E6000", "T13065")
> >
> > How do I fix this so I don't get an "Error 2015"
> >
> > Thanks, Rick
> >

0
rbrowniii (11)
1/7/2007 1:52:04 PM
Great

-- 
HTH
Nick Hodge
Microsoft MVP - Excel
Southampton, England
nick_hodgeTAKETHISOUT@zen.co.ukANDTHIS
www.nickhodge.co.uk


"2D Rick" <rbrowniii@compuserve.com> wrote in message 
news:1168177924.828360.322280@q40g2000cwq.googlegroups.com...
> Thanks Nick, it works
> Rick
>
>
> Nick Hodge wrote:
>> 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
>> nick_hodgeTAKETHISOUT@zen.co.ukANDTHIS
>> www.nickhodge.co.uk
>>
>>
>> "2D Rick" <rbrowniii@compuserve.com> wrote in message
>> news:1168151093.743437.52990@q40g2000cwq.googlegroups.com...
>> >
>> >
>> > Dim x
>> > x = Application.CountIf("E5,E6000", "T13065")
>> >
>> > How do I fix this so I don't get an "Error 2015"
>> >
>> > Thanks, Rick
>> >
> 

0
1/7/2007 1:56:13 PM
Reply:

Similar Artilces:

Help with error 2015 in macro
Hi everyone, I've been trying to sort this macro out for what seems like an age now... Some progress has been made, and I'm hoping that this nis the final hurdle! The problem is as follows: Right, this is the first part of the code we've been trying to get to work: Sub driver_calc() Application.ScreenUpdating = False Dim myLC As Long Dim myLR As Long Dim myLRr As Long Dim myLCr As Long Sheets("Driver 1 - STUDENTS").Select With Sheets("Driver 1 - STUDENTS") Application.Calculation = xlCalculati...

How do I fix this so I don't get an "Error 2015"
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 nick_hodgeTAKETHISOUT@zen.co.ukANDTHIS www.nickhodge.co.uk "2D Rick" <rbrowniii@compuserve.com> wrote in m...