Count with two Statements

S

Steved

Hello from Steved

I have 800 Rows

I want to do a count please.
=COUNT(A1:B800,"1-City",COUNT(A1:B800,"305"))

The above gives a total =62

I go in and count myself I get =10 which is correct.

What is needed to be done to correct the Formula.

Thankyou.
 
B

Biff

Hi Steved!

What exactly are you wanting the count of? You have the
same two dimensional range for each value. Is "1-city" in
both columns A and B ? What about "305" ? Also, with 305
enclosed in quotation marks Excel thinks you want to count
a TEXT value, "305" and not the numeric value 305.

My best guess at what you need is:

=SUMPRODUCT(--(A1:A800="1-city"),--(B1:B800=305))

Biff
 
S

Steved

Hello Biff from Steved

Biff I am treating 305 as number but 11-190 I treat as a
text for the formula to work.

What you have set out for me works.

What I would like to do is do a IF Formula for the
reason my computer is to slow in calculating 800 rows
it takes about a half hour also I am using vba in shorting
as an example Panmure to 8-Panm Swanson to 7-Swan and so
on I have nine cities I do this to.
 
S

Steved

Hello Duanne from Steved

Duanne I am Counting Bus Types, for exch of the nine
Cities.
 
B

Biff

I can't help you with VBA!

Biff
-----Original Message-----
Hello Biff from Steved

Biff I am treating 305 as number but 11-190 I treat as a
text for the formula to work.

What you have set out for me works.

What I would like to do is do a IF Formula for the
reason my computer is to slow in calculating 800 rows
it takes about a half hour also I am using vba in shorting
as an example Panmure to 8-Panm Swanson to 7-Swan and so
on I have nine cities I do this to.

.
 
S

Steved

That's ok Biff I decided to delete VBA.

This has speeded up calculations, which I am Happy with.

Cheers
 

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

Top