ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Need to sum row 7 columns based row 8 columns that are not Blank (https://www.excelbanter.com/excel-worksheet-functions/188947-need-sum-row-7-columns-based-row-8-columns-not-blank.html)

Leew

Need to sum row 7 columns based row 8 columns that are not Blank
 
I am trying to sum the columns in row 7 as long as the columns in row 8 are
not blank

Example:

a b c d e
f g h
7 2007 7 3 4 4 6 5 3
8 2008 67 82 76 131

I've tried this formula =SUM(INDEX(1/COUNTIF(B8:M8,B8:M8&"")*B7:M7,0))

however it is adding column 6 that should not be adding giving me a result
of 24 instead of 18.

Please can you help me on this matter. I need to add all columns in row 7 as
long as the respective column in row 8 is not blank.

Thanks,


Pete_UK

Need to sum row 7 columns based row 8 columns that are not Blank
 
Have you tried SUMIF?:

=SUMIF(8:8,"<",7:7)

or you might like to make the references as follows:

=SUMIF(B8:M8,"<",B7:M7)

Hope this helps.

Pete

On May 27, 1:41*pm, Leew wrote:
I am trying to sum the columns in row 7 as long as the columns in row 8 are
not blank

Example:

* * * a * * * * b * * * * * * c * * * * * * * d * * * * * * *e * * * * * * *
f * * * * * * * *g * * * * * * *h
7 *2007 7 * * * 3 * * * 4 * * * 4 * * * 6 * * * 5 * * * 3
8 *2008 67 * * *82 * * *76 * * *131 * *

I've tried this formula * * * * *=SUM(INDEX(1/COUNTIF(B8:M8,B8:M8&"")*B7:M7,0))

however it is adding column 6 that should not be adding giving me a result
of 24 instead of 18.

Please can you help me on this matter. I need to add all columns in row 7 as
long as the respective column in row 8 is not blank.

Thanks,



Leew

Need to sum row 7 columns based row 8 columns that are not Bla
 
Hey Pete,

Cheers mate, I had this formula first but not working since I was adding "0"
after the <. Did not know how to use the Blank.

Regards,

"Pete_UK" wrote:

Have you tried SUMIF?:

=SUMIF(8:8,"<",7:7)

or you might like to make the references as follows:

=SUMIF(B8:M8,"<",B7:M7)

Hope this helps.

Pete

On May 27, 1:41 pm, Leew wrote:
I am trying to sum the columns in row 7 as long as the columns in row 8 are
not blank

Example:

a b c d e
f g h
7 2007 7 3 4 4 6 5 3
8 2008 67 82 76 131

I've tried this formula =SUM(INDEX(1/COUNTIF(B8:M8,B8:M8&"")*B7:M7,0))

however it is adding column 6 that should not be adding giving me a result
of 24 instead of 18.

Please can you help me on this matter. I need to add all columns in row 7 as
long as the respective column in row 8 is not blank.

Thanks,




Pete_UK

Need to sum row 7 columns based row 8 columns that are not Bla
 
You're welcome, Lee - thanks for feeding back.

Pete

On May 27, 2:19*pm, Leew wrote:
Hey Pete,

Cheers mate, I had this formula first but not working since I was adding "0"
after the <. Did not know how to use the Blank.

Regards,



"Pete_UK" wrote:
Have you tried SUMIF?:


=SUMIF(8:8,"<",7:7)


or you might like to make the references as follows:


=SUMIF(B8:M8,"<",B7:M7)


Hope this helps.


Pete


On May 27, 1:41 pm, Leew wrote:
I am trying to sum the columns in row 7 as long as the columns in row 8 are
not blank


Example:


* * * a * * * * b * * * * * * c * * * * * * * d * * * * * * *e * * * * * * *
f * * * * * * * *g * * * * * * *h
7 *2007 7 * * * 3 * * * 4 * * * 4 * * * 6 * * * 5 * * * 3
8 *2008 67 * * *82 * * *76 * * *131 * *


I've tried this formula * * * * *=SUM(INDEX(1/COUNTIF(B8:M8,B8:M8&"")*B7:M7,0))


however it is adding column 6 that should not be adding giving me a result
of 24 instead of 18.


Please can you help me on this matter. I need to add all columns in row 7 as
long as the respective column in row 8 is not blank.


Thanks,- Hide quoted text -


- Show quoted text -




All times are GMT +1. The time now is 02:54 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com