View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Bob Phillips[_3_] Bob Phillips[_3_] is offline
external usenet poster
 
Posts: 2,420
Default Search a column for values, return a value from adj column

=SUMPRODUCT((A1:A10={"jewel","Dominicks"})*(B1:B10 ))

=SUM(B:B)-SUMPRODUCT((A1:A10={"jewel","Dominicks","Subway"," Wendys"})*(B1:B10))

--
__________________________________
HTH

Bob

"Adam" wrote in message
...
i want to setup some sort of formula to search a column for specific
keywords
(multiple keywords as well) and return a value from an adjacent column
(organizing my expenses), and then add the values up:

example:

A B C D E
1 Jewel 50 65 20 60
2 Dominicks 15
3 Speedway 50
4 Subway 10
5 Wendys 10
6 KFC 10

look in the list, search for jewel and dominicks, return 65 (50 + 15).

look in the list, search for wendys and subway, return 20 (10 + 10).

and then if a value is not technically searched for (just some of misc
value), still return the additive values of each adjacent data. so
speedway
and kfc weren't in the formulas, take their adjacent values and add them
together, 60.

there's probably already some sort of checkbook/expenses sheet setup like
this, i just have to find it.