Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Connie Martin
 
Posts: n/a
Default Need help to expand existing formula

I have this formula, which works wonderfully, but I want to expand it:
=COUNTIF(L30:L500,"=-4")-COUNTIF(L30:L500,"0")
I want that formula to count only if "BAG" is in E30:E500.

Is this possible?

Connie
  #2   Report Post  
Dave Peterson
 
Posts: n/a
Default

How about:

=SUMPRODUCT(--(E30:E500="BAG"),--(L30:L500=-4),--(L30:L500<=0))



Connie Martin wrote:

I have this formula, which works wonderfully, but I want to expand it:
=COUNTIF(L30:L500,"=-4")-COUNTIF(L30:L500,"0")
I want that formula to count only if "BAG" is in E30:E500.

Is this possible?

Connie


--

Dave Peterson
  #3   Report Post  
JulieD
 
Posts: n/a
Default

Hi Connie

you'll need to use the SUMPRODUCT formula if you want to count the number of
records meeting two criteria:

=SUMPRODUCT(--(L30:L500=-4),--(E30:E500="BAG"))-SUMPRODUCT(--(L30:L500=0),--(E30:E500="BAG"))

Check out
http://www.xldynamic.com/source/xld.SUMPRODUCT.html

for details on how the SUMPRODUCT function works.

cheers
JulieD

"Connie Martin" wrote in message
...
I have this formula, which works wonderfully, but I want to expand it:
=COUNTIF(L30:L500,"=-4")-COUNTIF(L30:L500,"0")
I want that formula to count only if "BAG" is in E30:E500.

Is this possible?

Connie



  #4   Report Post  
JE McGimpsey
 
Posts: n/a
Default

one way:

=SUMPRODUCT(--(L30:L500=-4),--(L30:L500<=0),--(E30:E500="BAG"))


In article ,
"Connie Martin" wrote:

I have this formula, which works wonderfully, but I want to expand it:
=COUNTIF(L30:L500,"=-4")-COUNTIF(L30:L500,"0")
I want that formula to count only if "BAG" is in E30:E500.

Is this possible?

Connie

  #5   Report Post  
Connie Martin
 
Posts: n/a
Default

Thank you, Dave, Julie and JE. I've seen this SUMPRODUCT before! I will
have to learn it because this has come up before. Thank you for your
responses. What a wonderful newsgroup! Have a great Friday! Connie


"Connie Martin" wrote:

I have this formula, which works wonderfully, but I want to expand it:
=COUNTIF(L30:L500,"=-4")-COUNTIF(L30:L500,"0")
I want that formula to count only if "BAG" is in E30:E500.

Is this possible?

Connie



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
revert formula insertion to old method Don't be a pain in the ass Setting up and Configuration of Excel 0 January 24th 05 01:49 PM
Simple formula doesn't quite add up circeo Excel Discussion (Misc queries) 3 January 17th 05 09:04 PM
how do I make a formula NOT change when the data range is moved? Alida Andrews Excel Discussion (Misc queries) 2 January 6th 05 09:02 PM
Cell doesn't show formula result - it shows formula (CTRL + ' doe. o0o0o0o Excel Worksheet Functions 6 November 19th 04 03:13 PM
Excel 2003 - Formula result shows as 0:00 Serena Excel Worksheet Functions 4 November 11th 04 10:18 PM


All times are GMT +1. The time now is 05:58 AM.

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"