Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 10
Default search for text then add

Cat. No. Cost per
M 20 $2.00
W 10 $1.00
M/W 5 $1.00
M 20 $2.00

based on the matrix above i need a formula to compute the following:
1) search down column 1 for a "M" in the cell/word then total the quantity
in the corresponding row. (for this example "M" would add up to 45, "W"
would be 15).

2) then i need it to be able to total the cost spent for each category (for
this example "M" would be 20*$2+5*$1+20*$2).
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default search for text then add

Try this...

=SUMIF(A2:A5,"*M*",B2:B5)

Better to use a cell to hold the criteria...

E2 = M

=SUMIF(A2:A5,"*"&E2&"*",B2:B5)

--
Biff
Microsoft Excel MVP


"r2rcode" wrote in message
...
Cat. No. Cost per
M 20 $2.00
W 10 $1.00
M/W 5 $1.00
M 20 $2.00

based on the matrix above i need a formula to compute the following:
1) search down column 1 for a "M" in the cell/word then total the quantity
in the corresponding row. (for this example "M" would add up to 45, "W"
would be 15).

2) then i need it to be able to total the cost spent for each category
(for
this example "M" would be 20*$2+5*$1+20*$2).



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 10
Default search for text then add

thanks. and what formula will do part 2) of my question where it multiplies
the qty by the cost per and then sums up all the products for a certain
category.

"T. Valko" wrote:

Try this...

=SUMIF(A2:A5,"*M*",B2:B5)

Better to use a cell to hold the criteria...

E2 = M

=SUMIF(A2:A5,"*"&E2&"*",B2:B5)

--
Biff
Microsoft Excel MVP


"r2rcode" wrote in message
...
Cat. No. Cost per
M 20 $2.00
W 10 $1.00
M/W 5 $1.00
M 20 $2.00

based on the matrix above i need a formula to compute the following:
1) search down column 1 for a "M" in the cell/word then total the quantity
in the corresponding row. (for this example "M" would add up to 45, "W"
would be 15).

2) then i need it to be able to total the cost spent for each category
(for
this example "M" would be 20*$2+5*$1+20*$2).



.

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default search for text then add

thanks. and what formula will do part 2)

Ooops! I don't know how I missed that part.

Try this...

E2 = M

=SUMPRODUCT(--(ISNUMBER(SEARCH(E2,A2:A5))),B2:B5,C2:C5)

--
Biff
Microsoft Excel MVP


"r2rcode" wrote in message
...
thanks. and what formula will do part 2) of my question where it
multiplies
the qty by the cost per and then sums up all the products for a certain
category.

"T. Valko" wrote:

Try this...

=SUMIF(A2:A5,"*M*",B2:B5)

Better to use a cell to hold the criteria...

E2 = M

=SUMIF(A2:A5,"*"&E2&"*",B2:B5)

--
Biff
Microsoft Excel MVP


"r2rcode" wrote in message
...
Cat. No. Cost per
M 20 $2.00
W 10 $1.00
M/W 5 $1.00
M 20 $2.00

based on the matrix above i need a formula to compute the following:
1) search down column 1 for a "M" in the cell/word then total the
quantity
in the corresponding row. (for this example "M" would add up to 45,
"W"
would be 15).

2) then i need it to be able to total the cost spent for each category
(for
this example "M" would be 20*$2+5*$1+20*$2).



.



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
search for text then return text r2rcode Excel Worksheet Functions 1 March 3rd 10 07:23 PM
Nested formula to search a text string and return specific text Barbie Excel Worksheet Functions 10 February 21st 09 07:40 AM
How to search for text? Eric Excel Discussion (Misc queries) 11 March 20th 08 11:42 AM
Fun with text functions - search for text mr tom Excel Worksheet Functions 7 October 26th 07 07:17 PM
Search, find or lookup defined text in text string zzxxcc Excel Worksheet Functions 9 September 6th 07 09:37 PM


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