#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 45
Default sumif statement

I need to write a formula that does the following:

If column C = AP and somewhere in column M it says fee, then put the sum of
column HA here.

Please note, that column M might says Agency Fee or DG Fee or System Fee or
just Fee......but somewhere in the cells in column M the word Fee appears.
Is there a way to do this?
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default sumif statement

Maybe...

=sumproduct(--(c1:c100="AP"),--(isnumber(search("fee",M1:m100))),(ha1:ha100))



Karen Smith wrote:

I need to write a formula that does the following:

If column C = AP and somewhere in column M it says fee, then put the sum of
column HA here.

Please note, that column M might says Agency Fee or DG Fee or System Fee or
just Fee......but somewhere in the cells in column M the word Fee appears.
Is there a way to do this?


--

Dave Peterson
  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,311
Default sumif statement

One possible way if I understand you correctly:

=IF(AND(C1=AP1,COUNTIF(M:M,"Fee")0),SUM(HA:HA),"" )


"Karen Smith" wrote in message
...
I need to write a formula that does the following:

If column C = AP and somewhere in column M it says fee, then put the sum
of
column HA here.

Please note, that column M might says Agency Fee or DG Fee or System Fee
or
just Fee......but somewhere in the cells in column M the word Fee appears.
Is there a way to do this?



  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default sumif statement

I was confused by the question. But if your answer is correct, then I think:

=IF(AND(C1=AP1,COUNTIF(M:M,"*Fee*")0),SUM(HA:HA), "")

Would be closer.

PCLIVE wrote:

One possible way if I understand you correctly:

=IF(AND(C1=AP1,COUNTIF(M:M,"Fee")0),SUM(HA:HA),"" )

"Karen Smith" wrote in message
...
I need to write a formula that does the following:

If column C = AP and somewhere in column M it says fee, then put the sum
of
column HA here.

Please note, that column M might says Agency Fee or DG Fee or System Fee
or
just Fee......but somewhere in the cells in column M the word Fee appears.
Is there a way to do this?


--

Dave Peterson
  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default sumif statement

Some more info:

Adjust the ranges to match--but you can't use whole columns.

=sumproduct() likes to work with numbers. The -- stuff changes trues and falses
to 1's and 0's.

Bob Phillips explains =sumproduct() in much more detail he
http://www.xldynamic.com/source/xld.SUMPRODUCT.html

And J.E. McGimpsey has some notes at:
http://mcgimpsey.com/excel/formulae/doubleneg.html



Dave Peterson wrote:

Maybe...

=sumproduct(--(c1:c100="AP"),--(isnumber(search("fee",M1:m100))),(ha1:ha100))

Karen Smith wrote:

I need to write a formula that does the following:

If column C = AP and somewhere in column M it says fee, then put the sum of
column HA here.

Please note, that column M might says Agency Fee or DG Fee or System Fee or
just Fee......but somewhere in the cells in column M the word Fee appears.
Is there a way to do this?


--

Dave Peterson


--

Dave Peterson
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
Can I set the criteria in a sumif statement as a cell reference? Duncan Excel Worksheet Functions 3 July 27th 06 05:46 AM
Using 'AND' logic in a SUMIF statement IpcTrain Excel Worksheet Functions 2 March 10th 06 05:39 PM
sumif statement Jackie Excel Discussion (Misc queries) 7 March 9th 06 04:40 PM
my sumif statement brings back mutiple answers, how do I fix it? graham Excel Worksheet Functions 2 November 15th 05 08:14 PM
Do I need a sumif or sum of a vlookup formula? PeterB Excel Worksheet Functions 0 June 1st 05 12:23 PM


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

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

About Us

"It's about Microsoft Excel"