![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Board Regular
Join Date: Feb 2002
Location: Huntington Beach, CA USA
Posts: 327
|
Hi,
I need to sum a total in Column S7:S2000 only if Column Q7:Q2000 is populated(has a number in it)the sum total will reside in S6, so it would be something like this: =Sum(S7:S2000) if Q7:Q2000 is populated,if any cell in Q7:Q2000 is empty then the cell in Column S is not added to the total. Any help on this would be appreciated Thanks James |
|
|
|
|
|
#2 |
|
MrExcel MVP
Join Date: Feb 2002
Location: Bogota, Colombia
Posts: 11,927
|
Take a look at SUMIF Worksheet Function in the Help Files.
|
|
|
|
|
|
#3 | |
|
MrExcel MVP
Join Date: Feb 2002
Location: Winnipeg
Posts: 2,330
|
Quote:
=SUM((S7:S2000)*(Q7:Q2000<>0)) and enter it as an array formula (instead of pressing ENTER, use CTRL+SHIFT+ENTER).
__________________
Barrie Davidson "You're only given a little spark of madness. You mustn't lose it." - Robin Williams |
|
|
|
|
|
|
#4 |
|
MrExcel MVP
Join Date: Feb 2002
Location: Bogota, Colombia
Posts: 11,927
|
Barrie, altough your formula works, I feel that there's no need for a CSE, since it's a SUM with only one condition --> SUMIF.
|
|
|
|
|
|
#5 |
|
MrExcel MVP
Join Date: Feb 2002
Location: Winnipeg
Posts: 2,330
|
You're absolutely correct! Couldn't see the forest for the trees
__________________
Barrie Davidson "You're only given a little spark of madness. You mustn't lose it." - Robin Williams |
|
|
|
|
|
#6 |
|
MrExcel MVP
Join Date: Feb 2002
Location: The Hague
Posts: 50,314
|
In S6 enter: =(SUM(Q7:Q2000)>0)*(SUM(S7:S2000)) Aladin |
|
|
|
|
|
#7 | |
|
MrExcel MVP
Join Date: Feb 2002
Location: Austin, Texas USA
Posts: 11,654
|
Quote:
|
|
|
|
|
|
|
#8 |
|
New Member
Join Date: Aug 2011
Posts: 2
|
I've tried the solotion provided here, and I think it does not work on Excel 2007 as it did on older versions.
My situation is slightly different though, so it may just need a different formula. I am trying to sum H7:I20 when D7:D20 is not blank. If a cell in D7:D20 is blank, then I don't want to sum any of the cells on that row (do not include H Because people keep breaking the formulas that use Ctrl+Shift+Enter, I'm trying to avoid this if at all possible. I would appreciate any advice. Thanks, Michael |
|
|
|
|
|
#9 |
|
MrExcel MVP
Join Date: Oct 2006
Location: Bryan, TX
Posts: 21,122
|
Welcome to the board..
Try =SUMPRODUCT((D7:D20<>"")*(H7:I20))
__________________
Want better/faster responses to your questions? Use Excel Jeanie to post samples of your sheet. The more we learn, and the better we get at our trade, the easier it becomes to overlook the obvious. Life moves pretty fast. If you don't stop and look around once in a while, you could miss it. Ferris Bueller A.K.A. John Hughes, 1986 |
|
|
|
|
|
#10 |
|
Board Regular
Join Date: Jan 2009
Posts: 827
|
In Excel 2007, or any other version...use the simple formula in S6:
=SUMIF(Q7:Q2000,">0",S7:S2000) or SUMIF(Q7:Q2000,">""",S7:S2000) with Q column as your criteria range, the operator ">0" as your criteria, and the S column as the values you want summed when the condition in Q is met.
__________________
Humpty Dumpty was pushed |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|