Need to sum row 7 columns based row 8 columns that are not Blank

L

Leew

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,
 
P

Pete_UK

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
 
L

Leew

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,
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top