Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
Asa_johannesen
 
Posts: n/a
Default Using multiple criterie in one column to sum another column

I would like to add data in column A by criteria from column B. Both columns
contain numbers and I want two criteria from column B (I think). I Basically
what I want is to say that if the numbers in column B are between 4 and 10
(including 10 and not 4) I want the sum of the corresponding numbers in
column A. Is this making sense? So if column A had 2,2,2,4,6,3,1,7,3,2 and
column B had 12,4,2,6,10,3,5,17,9,4 I would want the result to be 14. I have
tried many variations of sum.if and sumproduct and so on and nothing seems to
work. I either get an error message saying that there is a flaw in the
formula (it doesn't like the "," I use to separate things with and so on) or
I get a return of "0". Can anyone tell me what I am supposed to do?
  #2   Report Post  
Posted to microsoft.public.excel.misc
excelent
 
Posts: n/a
Default Using multiple criterie in one column to sum another column

=SUMPRODUCT((B1:B10=5)*(B1:B10<=10)*(A1:A10))
  #3   Report Post  
Posted to microsoft.public.excel.misc
Asa_johannesen
 
Posts: n/a
Default Using multiple criterie in one column to sum another column

Cool. Thank you. I also managed to get it to work using :

{=SUM(HVIS(B1:B10=5;HVIS(B1:B10<=10;A1:A10;0);0)) }

Your way is easier though ;-)

This is in Danish so HVIS is IF. Otherwise I think it's written the same way.

"excelent" skrev:

=SUMPRODUCT((B1:B10=5)*(B1:B10<=10)*(A1:A10))

  #4   Report Post  
Posted to microsoft.public.excel.misc
excelent
 
Posts: n/a
Default Using multiple criterie in one column to sum another column

kunne tyde på du har en dansk version :-) well done

  #5   Report Post  
Posted to microsoft.public.excel.misc
Asa_johannesen
 
Posts: n/a
Default Using multiple criterie in one column to sum another column

Ja det har jeg jo nok hvilket gør det besværligt at spørge på engelsk da ting
ikke hedder det samme. Jeg startede nemlig med guiden til betinget sum
(tilføjelsesprogrammet), men den sagde bare run time error 1004 Kan ikke
angive egenskaben FormulaArray for klassen Range. Jeg tror det er fordi jeg
har for meget data. Det var med guiden jeg fandt matrix formelen ved at lave
en lille tabel med data til at bruge guiden på. :)

"excelent" skrev:

kunne tyde på du har en dansk version :-) well done



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
Conditional Format as a MACRO Gunjani Excel Worksheet Functions 3 March 29th 06 05:22 PM
Upload multiple text files into 1 excel worksheet + put the filename as the first column in the worksheet Aster Excel Worksheet Functions 3 March 12th 06 09:58 AM
Need to Improve Code Copying/Pasting Between Workbooks David Excel Discussion (Misc queries) 1 January 6th 06 03:56 AM
Positioning Numeric Values Resulting from 6 Column Array Formula Sam via OfficeKB.com Excel Worksheet Functions 2 January 5th 06 02:03 AM
generate multiple rows based on cell value Theresa Excel Worksheet Functions 0 May 25th 05 11:18 PM


All times are GMT +1. The time now is 07:19 PM.

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

About Us

"It's about Microsoft Excel"