#1   Report Post  
jbressma
 
Posts: n/a
Default Excel formulas

I am creating a spreadsheet that tracks our current staff across the country.
Is there a way to create a formula that counts from two different fields.

For example I want the total number of people if Column B reads "ATLANTA"
and column F reads "ACTIVE"

I was thinking I could use COUNTIF somehow....but can't quite figure it out
  #2   Report Post  
Peo Sjoblom
 
Posts: n/a
Default

One way

=SUMPRODUCT(--(B2:B100="ATLANTA"),--(F2:F100="ACTIVE"))

you could replace the criteria with cell references so it be easier to
change criteria, also note that unlike countif you can't use the whole column
like B;B

Regards,

Peo Sjoblom

"jbressma" wrote:

I am creating a spreadsheet that tracks our current staff across the country.
Is there a way to create a formula that counts from two different fields.

For example I want the total number of people if Column B reads "ATLANTA"
and column F reads "ACTIVE"

I was thinking I could use COUNTIF somehow....but can't quite figure it out

  #3   Report Post  
Dave O
 
Posts: n/a
Default

You can do this using a variation of SUMPRODUCT(). You'll need to
expand the ranges to reflect your application, but try this:
=SUMPRODUCT(--(B1:B10="ATLANTA"),--(F1:F10="ACTIVE"))

Note that spelling matters! ATLANT A is different from ATLANTA and
even a trailing or leading blank space will skew your results. Hope
this does it for you!

  #4   Report Post  
jbressma
 
Posts: n/a
Default

Thanks! That worked perfectly.

"Peo Sjoblom" wrote:

One way

=SUMPRODUCT(--(B2:B100="ATLANTA"),--(F2:F100="ACTIVE"))

you could replace the criteria with cell references so it be easier to
change criteria, also note that unlike countif you can't use the whole column
like B;B

Regards,

Peo Sjoblom

"jbressma" wrote:

I am creating a spreadsheet that tracks our current staff across the country.
Is there a way to create a formula that counts from two different fields.

For example I want the total number of people if Column B reads "ATLANTA"
and column F reads "ACTIVE"

I was thinking I could use COUNTIF somehow....but can't quite figure it out

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Simple formulas in existing Excel 2002 no longer working. AllieB Excel Worksheet Functions 3 May 3rd 05 04:14 PM
Help, Urgent Excel Formulas are not calculating maashoff Excel Discussion (Misc queries) 1 May 3rd 05 12:25 AM
I want Excel to allow cells with formulas and unrelated text blueboy Excel Discussion (Misc queries) 9 March 4th 05 12:22 AM
How do I save a copy of an excel file without the formulas? Saving Excel File without Formula Excel Worksheet Functions 1 February 14th 05 08:55 PM
Problems with Excel formulas when 2002 upgraded to XP Kathi McGraw Excel Worksheet Functions 0 November 16th 04 05:27 PM


All times are GMT +1. The time now is 11:46 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"