Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
JEH
 
Posts: n/a
Default Multiple criterion including wildcards to sum in a range

Can someone help me please? In the example below, what formula would I use
to sum data in column C that relates to Fred's combined pensions. Note the
string 'pension' or 'pensions' is in not particular position.

Col A Col B Col C
multi sector - Pensions Fred $100,000
Pension - Equity Fred $150,000
Pensions - Lifetime Fred $100,000
Equities Fred $90,000
Property Fred $45,000
Pension - Allocated Mary $50,000
multi sector - Pensions Mary $75,000
Pension - Equity Mary $100,000

I think I need to nest criterion bit despite trying examples given in
discussion posts on this site am having trouble getting anything to work.

If you can help, thanks in advance.
John.


  #2   Report Post  
Aladin Akyurek
 
Posts: n/a
Default

=SUMPRODUCT(--ISNUMBER(SEARCH(D2,$A$2:$A$100)),--($B$2:$B$100=E2),$C$2:$C$100)

where D2 houses the word Pension and E2 the name Fred.

Note that this type of formulas does not admit whole column references
like A:A.

JEH wrote:
Can someone help me please? In the example below, what formula would I use
to sum data in column C that relates to Fred's combined pensions. Note the
string 'pension' or 'pensions' is in not particular position.

Col A Col B Col C
multi sector - Pensions Fred $100,000
Pension - Equity Fred $150,000
Pensions - Lifetime Fred $100,000
Equities Fred $90,000
Property Fred $45,000
Pension - Allocated Mary $50,000
multi sector - Pensions Mary $75,000
Pension - Equity Mary $100,000

I think I need to nest criterion bit despite trying examples given in
discussion posts on this site am having trouble getting anything to work.

If you can help, thanks in advance.
John.


  #3   Report Post  
JEH
 
Posts: n/a
Default

Thank you very much. I would never have got there on my own! Can D2 house a
wildcard, such as "*pens*" ?

"Aladin Akyurek" wrote:

=SUMPRODUCT(--ISNUMBER(SEARCH(D2,$A$2:$A$100)),--($B$2:$B$100=E2),$C$2:$C$100)

where D2 houses the word Pension and E2 the name Fred.

Note that this type of formulas does not admit whole column references
like A:A.

JEH wrote:
Can someone help me please? In the example below, what formula would I use
to sum data in column C that relates to Fred's combined pensions. Note the
string 'pension' or 'pensions' is in not particular position.

Col A Col B Col C
multi sector - Pensions Fred $100,000
Pension - Equity Fred $150,000
Pensions - Lifetime Fred $100,000
Equities Fred $90,000
Property Fred $45,000
Pension - Allocated Mary $50,000
multi sector - Pensions Mary $75,000
Pension - Equity Mary $100,000

I think I need to nest criterion bit despite trying examples given in
discussion posts on this site am having trouble getting anything to work.

If you can help, thanks in advance.
John.



  #4   Report Post  
Harlan Grove
 
Posts: n/a
Default

"JEH" wrote...
Thank you very much. I would never have got there on my own!
Can D2 house a wildcard, such as "*pens*" ?

....

It could, but *pens* could match more than just pension or pensions. It
could match pensive, happens, Happenstance Income, Expenses, etc. If you
want to match pension, don't get lazy.


  #5   Report Post  
JEH
 
Posts: n/a
Default

I agree but just in this set of data it can only refer to pensions, but there
could be several truncations.

Thanks for your help.

"Harlan Grove" wrote:

"JEH" wrote...
Thank you very much. I would never have got there on my own!
Can D2 house a wildcard, such as "*pens*" ?

....

It could, but *pens* could match more than just pension or pensions. It
could match pensive, happens, Happenstance Income, Expenses, etc. If you
want to match pension, don't get lazy.





  #6   Report Post  
Peo Sjoblom
 
Posts: n/a
Default

One way


=SUMPRODUCT(--(ISNUMBER(SEARCH("pension",A2:A9))),--(B2:B9="Fred"),C2:C9)



--
Regards,

Peo Sjoblom

(No private emails please)


"JEH" wrote in message
...
Can someone help me please? In the example below, what formula would I
use
to sum data in column C that relates to Fred's combined pensions. Note
the
string 'pension' or 'pensions' is in not particular position.

Col A Col B Col C
multi sector - Pensions Fred $100,000
Pension - Equity Fred $150,000
Pensions - Lifetime Fred $100,000
Equities Fred $90,000
Property Fred $45,000
Pension - Allocated Mary $50,000
multi sector - Pensions Mary $75,000
Pension - Equity Mary $100,000

I think I need to nest criterion bit despite trying examples given in
discussion posts on this site am having trouble getting anything to work.

If you can help, thanks in advance.
John.



  #7   Report Post  
Harlan Grove
 
Posts: n/a
Default

"JEH" wrote...
Can someone help me please? In the example below, what formula would I use
to sum data in column C that relates to Fred's combined pensions. Note the
string 'pension' or 'pensions' is in not particular position.

Col A Col B Col C
multi sector - Pensions Fred $100,000
Pension - Equity Fred $150,000
Pensions - Lifetime Fred $100,000
Equities Fred $90,000
Property Fred $45,000
Pension - Allocated Mary $50,000
multi sector - Pensions Mary $75,000
Pension - Equity Mary $100,000

....

=SUMPRODUCT(ISNUMBER(SEARCH("PENSION",A2:A9))*(B2: B9="Fred"),C2:C9)

or the array formula

=SUM(IF(B2:B9="Fred",IF(ISNUMBER(SEARCH("PENSION", A2:A9)),C2:C9)))


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 get the mode, min, and max with multiple criteria? BobT Excel Discussion (Misc queries) 1 February 15th 05 03:20 AM
adding certain cells in multiple worksheets in multiple workbooks Stephen via OfficeKB.com Excel Worksheet Functions 1 February 4th 05 08:31 PM
XML / parent with multiple children and with multiple children Richard Excel Discussion (Misc queries) 0 January 5th 05 11:49 AM
Multiple formulas including INDIRECT Gizmo Excel Worksheet Functions 4 December 21st 04 07:07 PM
multiple entries benny Excel Worksheet Functions 3 December 6th 04 01:38 AM


All times are GMT +1. The time now is 05:34 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"