Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 19
Default Suming selected cells based on two criteria

I am wishing to search two specific columns (text) in a data base for two
separate specific criteria (text)and if these are a match then I want to sum
the numbers in a third colum that match the two criteria.
It would be like a dual VLOOKUP with a SUMIF attached based on the basis of
the results of a TRUE outcome of the VLOOKUP.
Does anyone know if it is possible to search on two criteria and if a match
sum all items in a third column, that have a match in regards to the two
search criteria.

You will be my idol if you are able to solve this one.

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Max Max is offline
external usenet poster
 
Posts: 9,221
Default Suming selected cells based on two criteria

SUMPRODUCT would be your idol here <g

Try something along these lines ..
In say, F1:
=SUMPRODUCT((A2:A100="Text1")*(B2:B100="Text2"),C2 :C100)
would sum col C where col A = "Text1" and col B = "Text2"
Note that the 3 ranges need to be identically sized, and SUMPRODUCT dosen't
accept entire col refs eg: A:A, B:B, C:C

And instead of hardcoding the criteria in the formula, perhaps better to
point to cells housing criteria, eg we could have it in F1 as:
=SUMPRODUCT(($A$2:$A$100=D1)*($B$2:$B$100=E1),$C$2 :$C$100)
where D1, E1 houses the criteria: Text1, Text2
With the 3 ranges fixed with the dollar signs, F1 could then be copied down
to return correspondingly for other sets of criteria in D2:E2, D3:E3, etc
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
"Gerard" wrote:
I am wishing to search two specific columns (text) in a data base for two
separate specific criteria (text)and if these are a match then I want to sum
the numbers in a third colum that match the two criteria.
It would be like a dual VLOOKUP with a SUMIF attached based on the basis of
the results of a TRUE outcome of the VLOOKUP.
Does anyone know if it is possible to search on two criteria and if a match
sum all items in a third column, that have a match in regards to the two
search criteria.

You will be my idol if you are able to solve this one.

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 19
Default Suming selected cells based on two criteria

Max you are my idol. You are an absolute legend and have provided me with a
much needed solution. Thankyou very much. YEAH!!!!!!!!

"Max" wrote:

SUMPRODUCT would be your idol here <g

Try something along these lines ..
In say, F1:
=SUMPRODUCT((A2:A100="Text1")*(B2:B100="Text2"),C2 :C100)
would sum col C where col A = "Text1" and col B = "Text2"
Note that the 3 ranges need to be identically sized, and SUMPRODUCT dosen't
accept entire col refs eg: A:A, B:B, C:C

And instead of hardcoding the criteria in the formula, perhaps better to
point to cells housing criteria, eg we could have it in F1 as:
=SUMPRODUCT(($A$2:$A$100=D1)*($B$2:$B$100=E1),$C$2 :$C$100)
where D1, E1 houses the criteria: Text1, Text2
With the 3 ranges fixed with the dollar signs, F1 could then be copied down
to return correspondingly for other sets of criteria in D2:E2, D3:E3, etc
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
"Gerard" wrote:
I am wishing to search two specific columns (text) in a data base for two
separate specific criteria (text)and if these are a match then I want to sum
the numbers in a third colum that match the two criteria.
It would be like a dual VLOOKUP with a SUMIF attached based on the basis of
the results of a TRUE outcome of the VLOOKUP.
Does anyone know if it is possible to search on two criteria and if a match
sum all items in a third column, that have a match in regards to the two
search criteria.

You will be my idol if you are able to solve this one.

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Max Max is offline
external usenet poster
 
Posts: 9,221
Default Suming selected cells based on two criteria

You're welcome, Gerard!
Thanks for the spirited call-back <g
--
Max
Singapore (.. we're 41 today!)
http://savefile.com/projects/236895
xdemechanik
---
"Gerard" wrote:
Max you are my idol. You are an absolute legend and have provided me with a
much needed solution. Thank you very much. YEAH!!!!!!!!

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
counting cells based on conditional formatting Marc Excel Discussion (Misc queries) 3 July 5th 06 08:37 PM
how do i add in numbers automatically based on adjacent cells cont lemskibar Excel Discussion (Misc queries) 2 December 22nd 05 05:27 PM
sum number of cells based on letter/title criteria chazmac Excel Worksheet Functions 2 November 28th 05 05:09 PM
Complicated counting of cells (based on other cells contents) George Excel Worksheet Functions 3 November 7th 05 06:39 PM
Counting rows based on criteria in multiple cells Margaret Excel Discussion (Misc queries) 11 December 2nd 04 11:04 PM


All times are GMT +1. The time now is 12:55 PM.

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"