count & If fomula

B

Bahareh

Hello

There is a rutine counting each week (very boring) I want to make it
authomatic. I have an spread sheet which 4 columns are important:

city, city status (On/Semi), state, %complete

I want this counting perocess:

1- I want to count: How many cities in each state are in "On" status?
2-I want to count: How many cities in each state are "100%" complete?

Please Help me to get ride of this boring manual updating.
Thanks
BHR
 
D

Domenic

Try...

=SUMPRODUCT(--(StateRange=State),--(StatusRange=Status))

and

=SUMPRODUCT(--(StateRange=State),--(PercentageCompleteRange=PercentageCom
plete))

Hope this helps!
 
B

Bahareh

Thanks Domenic.

The first formula works well. but the second one doesn't. I put

=SUMPRODUCT(--('Completed Cities'!G4:G400="IL"),--('Completed
Cities'!P4:p400>"100%"))

but it doesn't work. It says #N/A. but values exist until raw 229. I put the
formula to raw 400 as I will add raws daily at bottom and I don't want to
change the formula each day. but If this is the case why the first formula
works well?

I put the first one as :
=SUMPRODUCT(--('Completed Cities'!G4:G400="IL"),--('Completed
Cities'!C4:C400="on"))

and another question, Is it possible that I put two condition as: How many
cities in state are "On" or "pending" status?

Really Thanks
BHR
 
B

Bahareh

Thanks Domenic. The other issue also solved (It was becuase some cells had
#N/A content). but still I don`t know how to put >100% for second question
(as I saw that in some cities we had more than 100% progress in this phase.)

and If it is possible for 1st question to add another condition as:
How many cities in each state are "on" or "pending" status?

Really Thanks
BHR
 
D

Domenic

Bahareh said:
Thanks Domenic

You're very welcome!
...but still I don`t know how to put >100% for second question

Remove the quotes...

=SUMPRODUCT(--('Completed Cities'!G4:G400="IL"),--('Completed
Cities'!P4:p400>100%))
...and If it is possible for 1st question to add another condition as:
How many cities in each state are "on" or "pending" status

=SUMPRODUCT(--('Completed
Cities'!G4:G400="IL"),--ISNUMBER(MATCH('Completed
Cities'!C4:C400,{"on","pending"},0)))

Hope this helps!
 
B

Bahareh

Great! thanks!

Domenic said:
You're very welcome!


Remove the quotes...

=SUMPRODUCT(--('Completed Cities'!G4:G400="IL"),--('Completed
Cities'!P4:p400>100%))


=SUMPRODUCT(--('Completed
Cities'!G4:G400="IL"),--ISNUMBER(MATCH('Completed
Cities'!C4:C400,{"on","pending"},0)))

Hope this helps!
 

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